-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
40 lines (27 loc) · 1.04 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name := """ardiff"""
autoScalaLibrary := false
crossPaths := false
javacOptions ++= Seq("-Xlint:unchecked")
libraryDependencies ++= Seq(
"org.apache.commons" % "commons-compress" % "1.12",
"commons-io" % "commons-io" % "2.5",
"org.tukaani" % "xz" % "1.5",
"com.nothome" % "javaxdelta" % "2.0.1",
"com.novocode" % "junit-interface" % "0.11" % "test"
)
assemblyJarName in assembly := "ArchiveDiff-assembly.jar"
mainClass in assembly := Some("org.rogach.ardiff.ArchiveDiff")
test in assembly := {}
lazy val proguard = taskKey[File]("shrink assembled file with proguard")
proguard := {
val assemblyJar = assembly.value
val base = baseDirectory.value
val args =
IO.read(file("project/proguard.conf"))
.replace("${java.home}", sys.props("java.home"))
import _root_.proguard.{Configuration => ProGuardConfiguration, ConfigurationParser, ProGuard}
val config = new ProGuardConfiguration
new ConfigurationParser(args, "", base, new java.util.Properties).parse(config)
new ProGuard(config).execute()
file("target/ArchiveDiff.jar")
}