@@ -22,7 +22,7 @@ object Scalac {
22
22
// see: https://tpolecat.github.io/2017/04/25/scalac-flags.html
23
23
val parallelism = math.min(math.max(4 , java.lang.Runtime .getRuntime().availableProcessors()), 16 )
24
24
val baseOptions = Def .setting {
25
- val base = List (
25
+ List (
26
26
" -target:jvm-1.8" ,
27
27
" -deprecation" , // Emit warning and location for usages of deprecated APIs.
28
28
" -feature" , // Emit warning and location for usages of features that should be imported explicitly.
@@ -63,11 +63,6 @@ object Scalac {
63
63
" -Ybackend-parallelism" ,
64
64
parallelism.toString
65
65
)
66
-
67
- VersionNumber (sys.props(" java.version" )) match {
68
- case v if v.matchesSemVer(SemanticSelector (" >1.8" )) => base ++ List (" -release" , " 8" )
69
- case _ => base
70
- }
71
66
}
72
67
73
68
val scalaVersionOptions = Def .setting {
@@ -93,14 +88,26 @@ object Scalac {
93
88
}
94
89
}
95
90
96
- val commonsOptions = Def .setting(baseOptions.value ++ scalaVersionOptions.value)
91
+ val jvmVersionOptions = Def .setting {
92
+ VersionNumber (sys.props(" java.version" )) match {
93
+ case v if v.matchesSemVer(SemanticSelector (" >1.8" )) => List (" -release" , " 8" )
94
+ case _ => Nil
95
+ }
96
+ }
97
+
98
+ val commonsOptions =
99
+ Def .setting(baseOptions.value ++ scalaVersionOptions.value ++ jvmVersionOptions.value)
97
100
98
- val compileDocOptions = Def .setting {
99
- val base = List (" -skip-packages" , " org.apache" )
101
+ val docOptions = Def .setting {
102
+ val base =
103
+ baseOptions.value ++ scalaVersionOptions.value ++ List (" -skip-packages" , " org.apache" )
100
104
101
105
VersionNumber (scalaVersion.value) match {
102
106
case v if v.matchesSemVer(SemanticSelector (" 2.12.x" )) => base ++ List (" -no-java-comments" )
103
107
case _ => base
104
108
}
105
109
}
110
+
111
+ val replOptions = Def .setting(baseOptions.value ++ scalaVersionOptions.value)
112
+
106
113
}
0 commit comments