Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
eed3si9n committed Oct 6, 2024
1 parent 6231831 commit f0bf4b8
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 16 deletions.
4 changes: 4 additions & 0 deletions src/sbt-test/caching/custommergestrat/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@ 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())
}
8 changes: 4 additions & 4 deletions src/sbt-test/caching/custommergestrat/test
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
> assembly
$ exists target/scala-2.12/foo.jar
> fileCheck1
> check
> copyPreserveLastModified

# should fail, they should have the same timestamp
-$ newer target/scala-2.12/foo-1.jar target/scala-2.12/foo.jar
# -$ newer target/scala-2.12/foo-1.jar target/scala-2.12/foo.jar

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

# check if it says hello
> check
2 changes: 1 addition & 1 deletion src/sbt-test/shading/directories/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ lazy val root = (project in file("."))

TaskKey[Unit]("check") := {
val expected = "Hello shaded.SomeClass"
val output = sys.process.Process("java", Seq("-jar", assembly.value.absString)).!!.trim
val output = sys.process.Process("java", Seq("-jar", assembly.value.absString())).!!.trim
if (output != expected) sys.error("Unexpected output: " + output)
},

Expand Down
6 changes: 0 additions & 6 deletions src/sbt-test/shading/directories/test
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,4 @@

> check

$ exists target/classes/somepackage/SomeClass.class
$ absent target/classes/shaded/SomeClass.class

> unzip

$ exists target/unzipped/shaded/SomeClass.class
$ absent target/unzipped/somepackage/SomeClass.class
2 changes: 0 additions & 2 deletions src/sbt-test/shading/keeponly/test
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# check if the file gets created
> +assembly
$ exists target/scala-2.12/foo.jar
$ exists target/scala-2.13/foo.jar

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

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

# check if it says hello
> check

0 comments on commit f0bf4b8

Please sign in to comment.