@@ -30,31 +30,17 @@ packageOptions := Seq(
3030
3131packageBin in Compile := {
3232 val jar = (packageBin in Compile ).value
33- val base = baseDirectory.value
33+ val target = baseDirectory.value / " extensions " / " ls "
3434 val s = streams.value
35- IO .copyFile(jar, base / " ls.jar" )
36- Process (" pack200 --modification-time=latest --effort=9 --strip-debug " +
37- " --no-keep-file-order --unknown-attribute=strip " +
38- " ls.jar.pack.gz ls.jar" ).!!
39- if (Process (" git diff --quiet --exit-code HEAD" ).! == 0 ) {
40- Process (" git archive -o ls.zip --prefix=ls/ HEAD" ).!!
41- IO .createDirectory(base / " ls" )
42- IO .copyFile(base / " ls.jar" , base / " ls" / " ls.jar" )
43- IO .copyFile(base / " ls.jar.pack.gz" , base / " ls" / " ls.jar.pack.gz" )
44- Process (" zip ls.zip ls/ls.jar ls/ls.jar.pack.gz" ).!!
45- IO .delete(base / " ls" )
46- }
47- else {
48- s.log.warn(" working tree not clean; no zip archive made" )
49- IO .delete(base / " ls.zip" )
50- }
35+ IO .createDirectory(target)
36+ IO .copyFile(jar, target / " ls.jar" )
5137 val classpath = (dependencyClasspath in Runtime ).value
5238 val libraryJarPaths =
5339 classpath.files.filter{path =>
5440 path.getName.endsWith(" .jar" ) &&
5541 ! path.getName.startsWith(" scala-library" )}
5642 for (path <- libraryJarPaths) {
57- IO .copyFile(path, base / path.getName)
43+ IO .copyFile(path, target / path.getName)
5844 }
5945 jar
6046}
@@ -65,7 +51,6 @@ test in Test := {
6551}
6652
6753cleanFiles <++= baseDirectory { base =>
68- Seq (base / " ls.jar" ,
69- base / " ls.jar.pack.gz" ,
70- base / " ls.zip" ) }
54+ Seq (base / " extensions" )
55+ }
7156
0 commit comments