@@ -37,8 +37,11 @@ updateOptions := updateOptions.value.withGigahorse(false)
37
37
// artifact name will include scala version
38
38
crossPaths := true
39
39
40
- val `scala-2.12` = " 2.12.10"
41
- val `scala-2.13` = " 2.13.4"
40
+ // patch for error on 'early-semver' problems
41
+ ThisBuild / evictionErrorLevel := Level .Info
42
+
43
+ val `scala-2.12` = " 2.12.13"
44
+ val `scala-2.13` = " 2.13.6"
42
45
val supportedScalaVersions = List (`scala-2.12`, `scala-2.13`)
43
46
44
47
def commonSettings (projectName : String ): Seq [sbt.Def .Setting [_]] = Seq (
@@ -53,8 +56,8 @@ def commonSettings(projectName: String): Seq[sbt.Def.Setting[_]] = Seq(
53
56
" com.github.vovapolu" %% " scaluzzi" % " 0.1.16"
54
57
),
55
58
// Scalanet snapshots are published to Sonatype after each build.
56
- resolvers += " Sonatype OSS Snapshots" at " https://oss.sonatype.org/content/repositories/snapshots" ,
57
- testOptions in Test += Tests
59
+ resolvers += " Sonatype OSS Snapshots" .at( " https://oss.sonatype.org/content/repositories/snapshots" ) ,
60
+ ( Test / testOptions) += Tests
58
61
.Argument (TestFrameworks .ScalaTest , " -l" , " EthashMinerSpec" ), // miner tests disabled by default,
59
62
scalacOptions := Seq (
60
63
" -unchecked" ,
@@ -67,18 +70,18 @@ def commonSettings(projectName: String): Seq[sbt.Def.Setting[_]] = Seq(
67
70
" utf-8"
68
71
),
69
72
scalacOptions ++= (if (mantisDev) Seq .empty else compilerOptimizationsForProd),
70
- scalacOptions in (Compile , console) ~= (_.filterNot(
73
+ (Compile / console / scalacOptions ) ~= (_.filterNot(
71
74
Set (
72
75
" -Ywarn-unused-import" ,
73
76
" -Xfatal-warnings"
74
77
)
75
78
)),
76
79
scalacOptions ~= (options => if (mantisDev) options.filterNot(_ == " -Xfatal-warnings" ) else options),
77
80
Test / parallelExecution := true ,
78
- testOptions in Test += Tests .Argument (" -oDG" ),
79
- (scalastyleConfig in Test ) := file(" scalastyle-test-config.xml" ),
81
+ ( Test / testOptions) += Tests .Argument (" -oDG" ),
82
+ (Test / scalastyleConfig ) := file(" scalastyle-test-config.xml" ),
80
83
// Only publish selected libraries.
81
- skip in publish := true
84
+ (publish / skip) := true
82
85
)
83
86
84
87
val publishSettings = Seq (
@@ -88,7 +91,7 @@ val publishSettings = Seq(
88
91
89
92
// Adding an "it" config because in `Dependencies.scala` some are declared with `% "it,test"`
90
93
// which would fail if the project didn't have configuration to add to.
91
- val Integration = config(" it" ) extend Test
94
+ val Integration = config(" it" ). extend( Test )
92
95
93
96
lazy val bytes = {
94
97
val bytes = project
@@ -143,11 +146,11 @@ lazy val rlp = {
143
146
}
144
147
145
148
lazy val node = {
146
- val Benchmark = config(" benchmark" ) extend Test
149
+ val Benchmark = config(" benchmark" ). extend( Test )
147
150
148
- val Evm = config(" evm" ) extend Test
151
+ val Evm = config(" evm" ). extend( Test )
149
152
150
- val Rpc = config(" rpcTest" ) extend Test
153
+ val Rpc = config(" rpcTest" ). extend( Test )
151
154
152
155
val malletDeps = Seq (
153
156
Dependencies .scopt
@@ -183,10 +186,10 @@ lazy val node = {
183
186
).flatten ++ malletDeps
184
187
}
185
188
186
- scalastyleSources in Test ++= { (unmanagedSourceDirectories in Integration ).value }
189
+ ( Test / scalastyleSources) ++= ( Integration / unmanagedSourceDirectories ).value
187
190
188
- (test in Evm ) := (test in Evm ).dependsOn(solidityCompile).value
189
- (sourceDirectory in Evm ) := baseDirectory.value / " src" / " evmTest"
191
+ (Evm / test ) := (Evm / test ).dependsOn(solidityCompile).value
192
+ (Evm / sourceDirectory ) := baseDirectory.value / " src" / " evmTest"
190
193
191
194
val node = project
192
195
.in(file(" ." ))
@@ -204,11 +207,11 @@ lazy val node = {
204
207
gitCurrentTags,
205
208
gitDescribedVersion,
206
209
gitUncommittedChanges,
207
- libraryDependencies in Compile
210
+ ( Compile / libraryDependencies)
208
211
),
209
212
buildInfoPackage := " io.iohk.ethereum.utils" ,
210
- fork in Test := true ,
211
- buildInfoOptions in Compile += BuildInfoOption .ToMap
213
+ ( Test / fork) := true ,
214
+ ( Compile / buildInfoOptions) += BuildInfoOption .ToMap
212
215
)
213
216
.settings(commonSettings(" mantis" ): _* )
214
217
.settings(inConfig(Integration )(scalafixConfigSettings(Integration )))
@@ -232,19 +235,19 @@ lazy val node = {
232
235
.settings(
233
236
// protobuf compilation
234
237
// Into a subdirectory of src_managed to avoid it deleting other generated files; see https://github.com/sbt/sbt-buildinfo/issues/149
235
- PB .targets in Compile := Seq (
236
- scalapb.gen() -> (sourceManaged in Compile ).value / " protobuf"
238
+ ( Compile / PB .targets) := Seq (
239
+ scalapb.gen() -> (Compile / sourceManaged ).value / " protobuf"
237
240
),
238
241
// have the protobuf API version file as a resource
239
- unmanagedResourceDirectories in Compile += baseDirectory.value / " src" / " main" / " protobuf" ,
242
+ ( Compile / unmanagedResourceDirectories) += baseDirectory.value / " src" / " main" / " protobuf" ,
240
243
// Packaging
241
- mainClass in Compile := Some (" io.iohk.ethereum.App" ),
242
- discoveredMainClasses in Compile := Seq (),
244
+ ( Compile / mainClass) := Some (" io.iohk.ethereum.App" ),
245
+ ( Compile / discoveredMainClasses) := Seq (),
243
246
// Requires the 'ant-javafx.jar' that comes with Oracle JDK
244
247
// Enables creating an executable with the configuration files, has to be run on the OS corresponding to the desired version
245
248
ThisBuild / jdkPackagerType := " image" ,
246
- mappings in Universal ++= directory((resourceDirectory in Compile ).value / " conf" ),
247
- mappings in Universal += (resourceDirectory in Compile ).value / " logback.xml" -> " conf/logback.xml" ,
249
+ ( Universal / mappings) ++= directory((Compile / resourceDirectory ).value / " conf" ),
250
+ ( Universal / mappings) += (Compile / resourceDirectory ).value / " logback.xml" -> " conf/logback.xml" ,
248
251
bashScriptExtraDefines += """ addJava "-Dconfig.file=${app_home}/../conf/app.conf"""" ,
249
252
bashScriptExtraDefines += """ addJava "-Dlogback.configurationFile=${app_home}/../conf/logback.xml"""" ,
250
253
batScriptExtraDefines += """ call :add_java "-Dconfig.file=%APP_HOME%\conf\app.conf"""" ,
@@ -258,7 +261,7 @@ lazy val node = {
258
261
node
259
262
else
260
263
// node.settings(PB.protocExecutable := file("protoc"))
261
- node.settings(PB .runProtoc in Compile := (args => Process (" protoc" , args) ! ))
264
+ node.settings(( Compile / PB .runProtoc) := (args => Process (" protoc" , args) ! ))
262
265
263
266
}
264
267
@@ -345,7 +348,5 @@ addCommandAlias(
345
348
|""" .stripMargin
346
349
)
347
350
348
- // Scala 2.12 only has up to 1.4.5, while 2.13 only from 1.4.7
349
- // In theory we should be able to switch on `scalaVersion.value` but it doesn't seem to work.
350
- scapegoatVersion in ThisBuild := (sys.env.getOrElse(" SCAPEGOAT_VERSION" , " 1.4.7" ))
351
+ (ThisBuild / scapegoatVersion) := " 1.4.9"
351
352
scapegoatReports := Seq (" xml" )
0 commit comments