forked from softprops/assembly-sbt
-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e4d3b36
commit 593ff38
Showing
4 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
lazy val root = (project in file(".")). | ||
settings( | ||
version := "0.1.0", | ||
scalaVersion := "2.12.18", | ||
libraryDependencies ++= Seq( | ||
"org.apache.cassandra" % "cassandra-all" % "4.0.0" | ||
), | ||
assembly / mainClass := Some("foo.Hello"), | ||
assembly / assemblyJarName := "foo.jar", | ||
TaskKey[Unit]("check") := { | ||
val outputJar = (crossTarget.value / "foo.jar").toString | ||
|
||
val process = sys.process.Process("java", Seq("-jar", outputJar)) | ||
val out = (process!!) | ||
if (out.trim != "hello") sys.error("unexpected output: " + out) | ||
|
||
|
||
val process2 = sys.process.Process("ls", Seq("-lh", outputJar)) | ||
println(process2!!) | ||
|
||
() | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
val pluginVersion = System.getProperty("plugin.version") | ||
if(pluginVersion == null) | ||
throw new RuntimeException("""|The system property 'plugin.version' is not defined. | ||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin) | ||
else addSbtPlugin("com.eed3si9n" % "sbt-assembly" % pluginVersion) | ||
} |
5 changes: 5 additions & 0 deletions
5
src/sbt-test/sbt-assembly/large-dep/src/main/scala/hello.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package foo | ||
|
||
object Hello extends App { | ||
println("hello") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
> assembly | ||
|
||
> check |