Created
October 2, 2013 08:05
-
-
Save netologist/6790457 to your computer and use it in GitHub Desktop.
sbt package dependency
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
packageOptions in (Compile, packageBin) <+= (target, externalDependencyClasspath in Runtime) map | |
{ (targetDirectory: File, classpath: Classpath) => | |
val relativePaths = classpath map { attrFile: Attributed[File] => targetDirectory.toPath().relativize(attrFile.data.toPath()).toString() }; | |
Package.ManifestAttributes(java.util.jar.Attributes.Name.CLASS_PATH -> relativePaths.reduceOption(_ + " " + _).getOrElse("")) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment