Skip to content

Commit

Permalink
Merge pull request #545 from eed3si9n/wip/bump
Browse files Browse the repository at this point in the history
Cross build to sbt 2.0.0-M3
  • Loading branch information
eed3si9n authored Dec 25, 2024
2 parents 4cb20eb + de28481 commit 54da839
Show file tree
Hide file tree
Showing 17 changed files with 20 additions and 46 deletions.
8 changes: 4 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ThisBuild / version := {
ThisBuild / organization := "com.eed3si9n"

def scala212 = "2.12.20"
def scala3 = "3.3.4"
def scala3 = "3.6.2"
ThisBuild / crossScalaVersions := Seq(scala212, scala3)
ThisBuild / scalaVersion := scala3

Expand Down Expand Up @@ -37,13 +37,13 @@ lazy val root = (project in file("."))
(pluginCrossBuild / sbtVersion) := {
scalaBinaryVersion.value match {
case "2.12" => "1.5.8"
case _ => "2.0.0-M2"
case _ => "2.0.0-M3"
}
}
scriptedSbt := {
scalaBinaryVersion.value match {
case "2.12" => "1.10.2"
case _ => "2.0.0-M2"
case "2.12" => "1.10.7"
case _ => "2.0.0-M3"
}
}
Compile / generateContrabands / sourceManaged := baseDirectory.value / "src" / "main" / "scala"
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.10.2
sbt.version=1.10.7
8 changes: 0 additions & 8 deletions src/sbt-test/caching/caching/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,3 @@ lazy val root = (project in file(".")).
()
}
)

TaskKey[Unit]("fileCheck1") := {
assert((crossTarget.value / "foo.jar").exists())
}

TaskKey[Unit]("fileCheck2") := {
assert((crossTarget.value / "jarHash.txt").exists())
}
4 changes: 2 additions & 2 deletions src/sbt-test/caching/caching/test
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# check if the file gets created
> clean
> assembly
> fileCheck1
$ exists target/**/foo.jar

# run to cache the hash, then check it's consistent
> check
> checkhash
> fileCheck2
$ exists target/**/jarHash.txt
> checkhash

> assembly
Expand Down
4 changes: 0 additions & 4 deletions src/sbt-test/caching/custommergestrat/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,3 @@ def mustContain(f: File, l: Seq[String]): Unit = {
TaskKey[Unit]("copy-preserve-last-modified") := {
IO.copy(Seq((crossTarget.value / "foo.jar") -> (crossTarget.value / "foo-1.jar")), true, true, true)
}

TaskKey[Unit]("fileCheck1") := {
assert((crossTarget.value / "foo.jar").exists())
}
4 changes: 2 additions & 2 deletions src/sbt-test/caching/custommergestrat/test
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
> assembly
> fileCheck1
$ exists target/**/foo.jar
> check
> copyPreserveLastModified

Expand All @@ -8,6 +8,6 @@

# assembly should run again, invalidating the cache because of the custom merge strategy
> assembly
> fileCheck1
$ exists target/**/foo.jar
> check
# $ newer target/scala-2.12/foo.jar target/scala-2.12/foo-1.jar
2 changes: 1 addition & 1 deletion src/sbt-test/merging/merging/test
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# check if the file gets created
> debug
> assembly
$ exists target/**/foo.jar

# check if it says hello
> check
5 changes: 3 additions & 2 deletions src/sbt-test/sbt-assembly/appendhash/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ lazy val root = (project in file("."))
},

TaskKey[Unit]("checkPrevious") := {
import sbinary.DefaultProtocol._
import CacheImplicits._
import sbinary.DefaultProtocol.*
import CacheImplicits.{given, *}
import Def.*
assert(Some(assembly.value) == assembly.previous)
}
)
4 changes: 0 additions & 4 deletions src/sbt-test/sbt-assembly/config/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@ lazy val root = (project in file("."))
()
}
)

TaskKey[Unit]("fileCheck") := {
assert((crossTarget.value / "foo.jar").exists())
}
2 changes: 1 addition & 1 deletion src/sbt-test/sbt-assembly/config/test
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# check if the file gets created
> Test/assembly
> fileCheck
$ exists target/**/foo.jar

# check if it says hello
> check
4 changes: 0 additions & 4 deletions src/sbt-test/sbt-assembly/deps/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,3 @@ lazy val root = (project in file("."))
()
}
)

TaskKey[Unit]("fileCheck") := {
assert((crossTarget.value / "foo.jar").exists())
}
2 changes: 1 addition & 1 deletion src/sbt-test/sbt-assembly/deps/test
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# check if the file gets created
> assembly
> fileCheck
$ exists target/**/foo.jar

# check if it says hello
> check
4 changes: 0 additions & 4 deletions src/sbt-test/sbt-assembly/piecemeal/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ lazy val root = (project in file("."))
}
)

TaskKey[Unit]("fileCheck1") := {
assert((crossTarget.value / "foo-assembly-0.1.jar").exists())
}

TaskKey[Unit]("fileCheck2") := {
assert((crossTarget.value / "foo-assembly-0.1-deps.jar").exists())
}
Expand Down
6 changes: 3 additions & 3 deletions src/sbt-test/sbt-assembly/piecemeal/test
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# check if the file gets created
> assembly
> fileCheck1
$ exists target/**/foo-assembly-0.1.jar

# try running this JAR. this should fail
-> check1

# check if the file gets created
> assemblyPackageDependency
> fileCheck2
$ exists target/**/foo-assembly-0.1-deps.jar

# check if the file gets created
> assemblyPackageScala
> fileCheck3
$ exists target/**/scala-library-2.12.18-assembly.jar

# check if it says hello
> check2
4 changes: 0 additions & 4 deletions src/sbt-test/sbt-assembly/simple/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,3 @@ TaskKey[Unit]("check") := {
if (out.trim != "hello") sys.error("unexpected output: " + out)
()
}

TaskKey[Unit]("fileCheck") := {
assert((crossTarget.value / "foo.jar").exists())
}
2 changes: 1 addition & 1 deletion src/sbt-test/sbt-assembly/simple/test
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# check if the file gets created
> assembly
> fileCheck
$ exists target/**/foo.jar

# check if it says hello
> check
1 change: 1 addition & 0 deletions src/sbt-test/shading/shading/test
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# check if the file gets created
> assembly
$ exists target/**/foo.jar

# check if it says hello
> check

0 comments on commit 54da839

Please sign in to comment.