Created
May 17, 2019 13:11
-
-
Save adamw/20fd70e5e696857391eab1e662361955 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
val stageDir = target.value / "native-docker" / "stage" | |
stageDir.mkdirs() | |
// copy all jars to the staging directory | |
val cpDir = stageDir / "cp" | |
cpDir.mkdirs() | |
val classpathJars = Seq((packageBin in Compile).value) ++ | |
(dependencyClasspath in Compile).value.map(_.data) | |
classpathJars.foreach(cpJar => Files.copy( | |
cpJar.toPath, | |
(cpDir / cpJar.name).toPath, | |
StandardCopyOption.REPLACE_EXISTING)) | |
val resultDir = stageDir / "result" | |
resultDir.mkdirs() | |
val resultName = "out" | |
val className = (mainClass in Compile).value | |
.getOrElse(sys.error("Could not find a main class.")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment