summaryrefslogtreecommitdiff
path: root/build.sc
diff options
context:
space:
mode:
Diffstat (limited to 'build.sc')
-rwxr-xr-xbuild.sc11
1 files changed, 11 insertions, 0 deletions
diff --git a/build.sc b/build.sc
index 3a7dae44..29f1955f 100755
--- a/build.sc
+++ b/build.sc
@@ -1,6 +1,7 @@
import ammonite.ops._
import mill._
import mill.scalaplugin._
+import mill.modules.Jvm.createAssembly
trait MillModule extends SbtScalaModule{ outer =>
def scalaVersion = "2.12.4"
@@ -96,6 +97,16 @@ object ScalaPlugin extends MillModule {
for((k, v) <- mapping.toSeq) yield s"-D$k=$v"
}
+ def releaseAssembly = T{
+ createAssembly(
+ (runDepClasspath().filter(_.path.ext != "pom") ++
+ Seq(resources(), compile().classes)).map(_.path).filter(exists),
+ prependShellScript =
+ "#!/usr/bin/env sh\n" +
+ s"""exec java $$JAVA_OPTS -cp "$$0" mill.Main "$$@" """
+ )
+ }
+
override def prependShellScript =
"#!/usr/bin/env sh\n" +
s"""exec java ${testArgs().mkString(" ")} $$JAVA_OPTS -cp "$$0" mill.Main "$$@" """