@@ -37,6 +37,9 @@ updateOptions := updateOptions.value.withGigahorse(false)
3737// artifact name will include scala version
3838crossPaths := true
3939
40+ // patch for error on 'early-semver' problems
41+ ThisBuild / evictionErrorLevel := Level .Info
42+
4043val `scala-2.12` = " 2.12.10"
4144val `scala-2.13` = " 2.13.4"
4245val supportedScalaVersions = List (`scala-2.12`, `scala-2.13`)
@@ -53,8 +56,8 @@ def commonSettings(projectName: String): Seq[sbt.Def.Setting[_]] = Seq(
5356 " com.github.vovapolu" %% " scaluzzi" % " 0.1.16"
5457 ),
5558 // 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
5861 .Argument (TestFrameworks .ScalaTest , " -l" , " EthashMinerSpec" ), // miner tests disabled by default,
5962 scalacOptions := Seq (
6063 " -unchecked" ,
@@ -67,18 +70,18 @@ def commonSettings(projectName: String): Seq[sbt.Def.Setting[_]] = Seq(
6770 " utf-8"
6871 ),
6972 scalacOptions ++= (if (mantisDev) Seq .empty else compilerOptimizationsForProd),
70- scalacOptions in (Compile , console) ~= (_.filterNot(
73+ (Compile / console / scalacOptions ) ~= (_.filterNot(
7174 Set (
7275 " -Ywarn-unused-import" ,
7376 " -Xfatal-warnings"
7477 )
7578 )),
7679 scalacOptions ~= (options => if (mantisDev) options.filterNot(_ == " -Xfatal-warnings" ) else options),
7780 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" ),
8083 // Only publish selected libraries.
81- skip in publish := true
84+ (publish / skip) := true
8285)
8386
8487val publishSettings = Seq (
@@ -88,7 +91,7 @@ val publishSettings = Seq(
8891
8992// Adding an "it" config because in `Dependencies.scala` some are declared with `% "it,test"`
9093// 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 )
9295
9396lazy val bytes = {
9497 val bytes = project
@@ -143,11 +146,11 @@ lazy val rlp = {
143146}
144147
145148lazy val node = {
146- val Benchmark = config(" benchmark" ) extend Test
149+ val Benchmark = config(" benchmark" ). extend( Test )
147150
148- val Evm = config(" evm" ) extend Test
151+ val Evm = config(" evm" ). extend( Test )
149152
150- val Rpc = config(" rpcTest" ) extend Test
153+ val Rpc = config(" rpcTest" ). extend( Test )
151154
152155 val malletDeps = Seq (
153156 Dependencies .scopt
@@ -183,10 +186,10 @@ lazy val node = {
183186 ).flatten ++ malletDeps
184187 }
185188
186- scalastyleSources in Test ++= { (unmanagedSourceDirectories in Integration ).value }
189+ ( Test / scalastyleSources) ++= ( Integration / unmanagedSourceDirectories ).value
187190
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"
190193
191194 val node = project
192195 .in(file(" ." ))
@@ -204,11 +207,11 @@ lazy val node = {
204207 gitCurrentTags,
205208 gitDescribedVersion,
206209 gitUncommittedChanges,
207- libraryDependencies in Compile
210+ ( Compile / libraryDependencies)
208211 ),
209212 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
212215 )
213216 .settings(commonSettings(" mantis" ): _* )
214217 .settings(inConfig(Integration )(scalafixConfigSettings(Integration )))
@@ -232,19 +235,19 @@ lazy val node = {
232235 .settings(
233236 // protobuf compilation
234237 // 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"
237240 ),
238241 // 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" ,
240243 // 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 (),
243246 // Requires the 'ant-javafx.jar' that comes with Oracle JDK
244247 // Enables creating an executable with the configuration files, has to be run on the OS corresponding to the desired version
245248 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" ,
248251 bashScriptExtraDefines += """ addJava "-Dconfig.file=${app_home}/../conf/app.conf"""" ,
249252 bashScriptExtraDefines += """ addJava "-Dlogback.configurationFile=${app_home}/../conf/logback.xml"""" ,
250253 batScriptExtraDefines += """ call :add_java "-Dconfig.file=%APP_HOME%\conf\app.conf"""" ,
@@ -258,7 +261,7 @@ lazy val node = {
258261 node
259262 else
260263 // 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) ! ))
262265
263266}
264267
@@ -347,5 +350,5 @@ addCommandAlias(
347350
348351// Scala 2.12 only has up to 1.4.5, while 2.13 only from 1.4.7
349352// 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" ))
353+ ( ThisBuild / scapegoatVersion) := (sys.env.getOrElse(" SCAPEGOAT_VERSION" , " 1.4.7" ))
351354scapegoatReports := Seq (" xml" )
0 commit comments