@@ -27,6 +27,10 @@ object Settings {
27
27
javaOptions += " -Xmx2G"
28
28
)
29
29
30
+ val java11BuildSettings = Seq ( // can be wrapped into commonBuildSettings when rawls-model can publish java 11
31
+ javacOptions ++= Seq (" --release" , " 11" )
32
+ )
33
+
30
34
val commonCompilerSettings = Seq (
31
35
" -unchecked" ,
32
36
" -feature" ,
@@ -78,13 +82,14 @@ object Settings {
78
82
val googleSettings = commonSettings ++ List (
79
83
name := " workbench-google" ,
80
84
libraryDependencies ++= googleDependencies
81
- ) ++ versionSettings ++ noPublishSettings
85
+ ) ++ versionSettings ++ noPublishSettings ++ java11BuildSettings
82
86
83
87
// the full list of settings for the rawlsModel project (see build.sbt)
84
88
// coreDefaultSettings (inside commonSettings) sets the project name, which we want to override, so ordering is important.
85
89
// thus commonSettings needs to be added first.
86
90
val modelSettings = cross212and213 ++ commonSettings ++ List (
87
91
name := " rawls-model" ,
92
+ javacOptions ++= Seq (" --release" , " 8" ), // has to publish a java 8 artifact
88
93
libraryDependencies ++= modelDependencies
89
94
) ++ versionSettings ++ publishSettings
90
95
@@ -94,15 +99,15 @@ object Settings {
94
99
val utilSettings = commonSettings ++ List (
95
100
name := " workbench-util" ,
96
101
libraryDependencies ++= utilDependencies
97
- ) ++ versionSettings ++ noPublishSettings
102
+ ) ++ versionSettings ++ noPublishSettings ++ java11BuildSettings
98
103
99
104
// the full list of settings for the workbenchMetrics project (see build.sbt)
100
105
// coreDefaultSettings (inside commonSettings) sets the project name, which we want to override, so ordering is important.
101
106
// thus commonSettings needs to be added first.
102
107
val metricsSettings = commonSettings ++ List (
103
108
name := " workbench-metrics" ,
104
109
libraryDependencies ++= metricsDependencies
105
- ) ++ versionSettings ++ noPublishSettings
110
+ ) ++ versionSettings ++ noPublishSettings ++ java11BuildSettings
106
111
107
112
// the full list of settings for the rawlsCore project (see build.sbt)
108
113
// coreDefaultSettings (inside commonSettings) sets the project name, which we want to override, so ordering is important.
@@ -111,7 +116,7 @@ object Settings {
111
116
name := " rawls-core" ,
112
117
version := " 0.1" ,
113
118
libraryDependencies ++= rawlsCoreDependencies
114
- ) ++ antlr4CodeGenerationSettings ++ rawlsAssemblySettings ++ noPublishSettings ++ rawlsCompileSettings
119
+ ) ++ antlr4CodeGenerationSettings ++ rawlsAssemblySettings ++ noPublishSettings ++ rawlsCompileSettings ++ java11BuildSettings
115
120
// NOTE: rawlsCoreCompileSettings above has to be last, because something in commonSettings or rawlsAssemblySettings
116
121
// overwrites it if it's before them. I (hussein) don't know what that is and I don't care to poke the bear to find out.
117
122
@@ -121,6 +126,6 @@ object Settings {
121
126
val rootSettings = commonSettings ++ List (
122
127
name := " rawls" ,
123
128
version := " 0.1"
124
- ) ++ rawlsAssemblySettings ++ noPublishSettings ++ rawlsCompileSettings
129
+ ) ++ rawlsAssemblySettings ++ noPublishSettings ++ rawlsCompileSettings ++ java11BuildSettings
125
130
// See immediately above NOTE.
126
131
}
0 commit comments