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 f62cb51 commit b47c1f5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/sbt-test/shading/directories/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ exportJars := false

lazy val root = (project in file("."))
.settings(
crossPaths := false,

assembly / assemblyJarName := "assembly.jar",

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

TaskKey[Unit]("unzip") := {
IO.unzip((assembly / assemblyOutputPath).value, crossTarget.value / "unzipped")
}
)

TaskKey[Unit]("check") := {
val expected = "Hello shaded.SomeClass"
val output = sys.process.Process(
"java",
Seq("-jar", (crossTarget.value / "assembly.jar").toString)
).!!.trim
if (output != expected) sys.error("Unexpected output: " + output)
}
1 change: 1 addition & 0 deletions src/sbt-test/shading/directories/test
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Test that assembly contains shaded classes
# but the original classes are left untouched.

> assembly
> check

> unzip

0 comments on commit b47c1f5

Please sign in to comment.