diff --git a/src/sbt-test/merging/mergefail/build.sbt b/src/sbt-test/merging/mergefail/build.sbt index 04c72d05..b34f2823 100644 --- a/src/sbt-test/merging/mergefail/build.sbt +++ b/src/sbt-test/merging/mergefail/build.sbt @@ -1,9 +1,9 @@ lazy val testmerge = (project in file(".")). settings( version := "0.1", - assemblyJarName in assembly := "foo.jar", - assemblyMergeStrategy in assembly := { - val old = (assemblyMergeStrategy in assembly).value + assembly / assemblyJarName := "foo.jar", + assembly / assemblyMergeStrategy := { + val old = (assembly / assemblyMergeStrategy).value { case _ => MergeStrategy.singleOrError diff --git a/src/sbt-test/merging/mergefail2/build.sbt b/src/sbt-test/merging/mergefail2/build.sbt index 013a9161..c88fd707 100644 --- a/src/sbt-test/merging/mergefail2/build.sbt +++ b/src/sbt-test/merging/mergefail2/build.sbt @@ -1,5 +1,5 @@ lazy val testmerge = (project in file(".")). settings( version := "0.1", - assemblyJarName in assembly := "foo.jar" + assembly / assemblyJarName := "foo.jar" ) diff --git a/src/sbt-test/merging/merging/build.sbt b/src/sbt-test/merging/merging/build.sbt index 2fd159eb..78a18fec 100644 --- a/src/sbt-test/merging/merging/build.sbt +++ b/src/sbt-test/merging/merging/build.sbt @@ -1,6 +1,6 @@ -version in ThisBuild := "0.1" -scalaVersion in ThisBuild := "2.12.15" -assemblyMergeStrategy in ThisBuild := { +ThisBuild / version := "0.1" +ThisBuild / scalaVersion := "2.12.15" +ThisBuild / assemblyMergeStrategy := { case "a" => MergeStrategy.concat case "b" => MergeStrategy.first case "c" => MergeStrategy.last @@ -9,13 +9,13 @@ assemblyMergeStrategy in ThisBuild := { case "f" => MergeStrategy.discard case PathList("x", "y") => MergeStrategy.discard case x => - val oldStrategy = (assemblyMergeStrategy in ThisBuild).value + val oldStrategy = (ThisBuild / assemblyMergeStrategy).value oldStrategy(x) } lazy val testmerge = (project in file(".")) .settings( - assemblyJarName in assembly := "foo.jar", + assembly / assemblyJarName := "foo.jar", TaskKey[Unit]("check") := { IO.withTemporaryDirectory { dir ⇒ IO.unzip(crossTarget.value / "foo.jar", dir) diff --git a/src/sbt-test/sbt-assembly/appendhash/build.sbt b/src/sbt-test/sbt-assembly/appendhash/build.sbt index 79cffe0a..024382d1 100644 --- a/src/sbt-test/sbt-assembly/appendhash/build.sbt +++ b/src/sbt-test/sbt-assembly/appendhash/build.sbt @@ -1,6 +1,6 @@ -version in ThisBuild := "0.1" -scalaVersion in ThisBuild := "2.12.8" -assemblyAppendContentHash in ThisBuild := true +ThisBuild / version := "0.1" +ThisBuild / scalaVersion := "2.12.8" +ThisBuild / assemblyAppendContentHash := true lazy val root = (project in file(".")) .settings( diff --git a/src/sbt-test/sbt-assembly/appendhash/test b/src/sbt-test/sbt-assembly/appendhash/test index beefe0a1..255c91d9 100644 --- a/src/sbt-test/sbt-assembly/appendhash/test +++ b/src/sbt-test/sbt-assembly/appendhash/test @@ -10,7 +10,7 @@ > assemblyPackageDependency > checkFile "foo-assembly-0.1-deps-[0-9abcdef]{40}.jar" -> set assemblyMaxHashLength in ThisBuild := 5 +> set ThisBuild / assemblyMaxHashLength := 5 > clean > assembly > checkFile "foo-assembly-0.1-[0-9abcdef]{5}.jar" diff --git a/src/sbt-test/sbt-assembly/config/build.sbt b/src/sbt-test/sbt-assembly/config/build.sbt index 9138807a..679ef140 100644 --- a/src/sbt-test/sbt-assembly/config/build.sbt +++ b/src/sbt-test/sbt-assembly/config/build.sbt @@ -1,5 +1,5 @@ -version in ThisBuild := "0.1" -scalaVersion in ThisBuild := "2.12.15" +ThisBuild / version := "0.1" +ThisBuild / scalaVersion := "2.12.15" lazy val root = (project in file(".")) .settings(inConfig(Test)(baseAssemblySettings)) diff --git a/src/sbt-test/sbt-assembly/deps/build.sbt b/src/sbt-test/sbt-assembly/deps/build.sbt index 0aa418ec..862b8986 100644 --- a/src/sbt-test/sbt-assembly/deps/build.sbt +++ b/src/sbt-test/sbt-assembly/deps/build.sbt @@ -1,5 +1,5 @@ -version in ThisBuild := "0.1" -scalaVersion in ThisBuild := "2.12.15" +ThisBuild / version := "0.1" +ThisBuild / scalaVersion := "2.12.15" lazy val root = (project in file(".")) .settings( diff --git a/src/sbt-test/sbt-assembly/empty/build.sbt b/src/sbt-test/sbt-assembly/empty/build.sbt index 612483ca..b64a65ca 100644 --- a/src/sbt-test/sbt-assembly/empty/build.sbt +++ b/src/sbt-test/sbt-assembly/empty/build.sbt @@ -1,2 +1,2 @@ -version in ThisBuild := "0.1" -scalaVersion in ThisBuild := "2.12.8" +ThisBuild / version := "0.1" +ThisBuild / scalaVersion := "2.12.8" diff --git a/src/sbt-test/sbt-assembly/piecemeal/build.sbt b/src/sbt-test/sbt-assembly/piecemeal/build.sbt index e1635047..65eb30ba 100644 --- a/src/sbt-test/sbt-assembly/piecemeal/build.sbt +++ b/src/sbt-test/sbt-assembly/piecemeal/build.sbt @@ -1,8 +1,8 @@ -version in ThisBuild := "0.1" -scalaVersion in ThisBuild := "2.12.15" +ThisBuild / version := "0.1" +ThisBuild / scalaVersion := "2.12.15" -assembleArtifact in (ThisBuild, assemblyPackageScala) := false -assembleArtifact in (ThisBuild, assemblyPackageDependency) := false +ThisBuild / assemblyPackageScala / assembleArtifact := false +ThisBuild / assemblyPackageDependency / assembleArtifact := false lazy val root = (project in file(".")) .settings( diff --git a/src/sbt-test/sbt-assembly/simple/build.sbt b/src/sbt-test/sbt-assembly/simple/build.sbt index b4edac62..4ca78ef8 100644 --- a/src/sbt-test/sbt-assembly/simple/build.sbt +++ b/src/sbt-test/sbt-assembly/simple/build.sbt @@ -1,5 +1,5 @@ -version in ThisBuild := "0.1" -scalaVersion in ThisBuild := "2.12.8" +ThisBuild / version := "0.1" +ThisBuild / scalaVersion := "2.12.8" lazy val root = (project in file(".")) .settings( diff --git a/src/sbt-test/shading/directories/build.sbt b/src/sbt-test/shading/directories/build.sbt index a2e5ac9b..877b61a8 100644 --- a/src/sbt-test/shading/directories/build.sbt +++ b/src/sbt-test/shading/directories/build.sbt @@ -1,6 +1,6 @@ -scalaVersion in ThisBuild := "2.12.15" +ThisBuild / scalaVersion := "2.12.15" -assemblyShadeRules in ThisBuild := Seq( +ThisBuild / assemblyShadeRules := Seq( ShadeRule.rename("somepackage.**" -> "shaded.@1").inAll ) diff --git a/src/sbt-test/shading/scalasigannot/build.sbt b/src/sbt-test/shading/scalasigannot/build.sbt index d6333595..91f9a7a1 100644 --- a/src/sbt-test/shading/scalasigannot/build.sbt +++ b/src/sbt-test/shading/scalasigannot/build.sbt @@ -1,31 +1,31 @@ -version in ThisBuild := "1.0-SNAPSHOT" -organization in ThisBuild := "scalasigannottest" -scalaVersion in ThisBuild := scala213 +ThisBuild / version := "1.0-SNAPSHOT" +ThisBuild / organization := "scalasigannottest" +ThisBuild / scalaVersion := scala213 lazy val scala212 = "2.12.15" lazy val scala213 = "2.13.7" -crossScalaVersions in ThisBuild := List(scala212, scala213) +ThisBuild / crossScalaVersions := List(scala212, scala213) val shadingSettings: Seq[Def.Setting[_]] = Seq( - assemblyShadeRules in assembly := Seq( + assembly / assemblyShadeRules := Seq( ShadeRule.rename( "to.be.shaded.**" -> "shade.@1" ).inAll ), - assemblyOption in assembly ~= { _.withIncludeScala(false) }, - assemblyExcludedJars in assembly := { - val cp = (fullClasspath in assembly).value + assembly / assemblyOption ~= { _.withIncludeScala(false) }, + assembly / assemblyExcludedJars := { + val cp = (assembly / fullClasspath).value cp.filterNot {p => p.data.getName.startsWith("tobeshaded") } }, - artifactClassifier in (sbt.Test, packageBin) := None, - artifact in (Compile, assembly) := (artifact in (Compile, assembly)).value.withClassifier(Some("shaded")) + sbt.Test / packageBin / artifactClassifier := None, + Compile / assembly / artifact := (Compile / assembly / artifact).value.withClassifier(Some("shaded")) -) ++ addArtifact(artifact in (Compile, assembly), assembly).settings +) ++ addArtifact(Compile / assembly / artifact, assembly).settings // A jar to be shaded in shadedLib lazy val toBeShaded = project.in(file("tobeshaded")) @@ -38,8 +38,8 @@ lazy val fatLib = project.in(file("fatlib")) .settings( Seq( name := "fatlib", - (unmanagedJars in Compile) := { - val tbs: File = ((packageBin in Compile) in toBeShaded).value + (Compile / unmanagedJars) := { + val tbs: File = (toBeShaded / Compile / packageBin).value //Seq(sbt.internal.util.Attributed.blank[java.io.File](tbs)) Seq(Attributed.blank[java.io.File](tbs)) @@ -61,7 +61,7 @@ lazy val root = project.in(file(".")) //val tbs: File = ((packageBin in (Compile, assembly)) in fatLib).value //Seq(sbt.internal.util.Attributed.blank[java.io.File](tbs)) - val x = (assembly in (fatLib, Compile)).value + val x = (fatLib / Compile / assembly).value Seq(Attributed.blank[java.io.File](x)) } )