-
Notifications
You must be signed in to change notification settings - Fork 3
/
proguard.sbt
37 lines (28 loc) · 988 Bytes
/
proguard.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
// proguard - reduce 30 MB artifact to something like 5.5 MB (https://github.com/sbt/sbt-proguard)
enablePlugins(SbtProguard)
proguardOptions in Proguard ++= Seq(
"-dontnote",
"-dontwarn scala.**",
"-dontwarn com.google.code.tempusfugit.**",
"-dontwarn org.apache.**",
"-dontwarn scodec.bits.**",
"-dontwarn scalaparsers.**",
"-ignorewarnings",
"-dontobfuscate",
"-printusage unused-code.txt",
"""
-keep public class bad.robot.** {
*;
}
-keep public class org.apache.commons.** {
*;
}
-keepclassmembers class * {
** MODULE$;
}
"""
)
proguardOptions in Proguard += ProguardOptions.keepMain("bad.robot.radiate.Main")
proguardInputs in Proguard := (dependencyClasspath in Compile).value.files
proguardFilteredInputs in Proguard ++= ProguardOptions.noFilter((packageBin in Compile).value)
javaOptions in(Proguard, proguard) := Seq("-Xmx2G") // avoids out of memory (https://github.com/sbt/sbt-proguard/issues/3)