File tree Expand file tree Collapse file tree 2 files changed +69
-1
lines changed Expand file tree Collapse file tree 2 files changed +69
-1
lines changed Original file line number Diff line number Diff line change 13
13
14
14
<target name =" package-for-store" depends =" jar" >
15
15
<property name =" store.jar.name" value =" ${ application.title } " />
16
+ <property name =" proguard.jar.path" value =" store/proguard.jar" />
16
17
17
18
<property name =" store.dir" value =" store" />
18
19
<property name =" store.jar" value =" ${ store.dir } /${ store.jar.name } .jar" />
20
+ <property name =" obfuscated.jar" value =" ${ store.dir } /${ store.jar.name } -obfuscated.jar" />
19
21
20
22
<echo message =" Packaging ${ application.title } into a single JAR at ${ store.jar } " />
21
23
22
- <delete dir =" ${ store.dir } " />
24
+ <delete file =" ${ store.jar } " />
25
+ <delete file =" ${ obfuscated.jar } " />
23
26
<mkdir dir =" ${ store.dir } " />
24
27
25
28
<jar destfile =" ${ store.dir } /temp_final.jar" filesetmanifest =" skip" >
37
40
</zip >
38
41
39
42
<delete file =" ${ store.dir } /temp_final.jar" />
43
+
44
+
45
+ <echo message =" Obfuscating ${ store.jar } ..." />
46
+
47
+ <taskdef resource =" proguard/ant/task.properties"
48
+ classpath =" ${ proguard.jar.path } " />
49
+
50
+ <proguard configuration =" proguard.properties" >
51
+
52
+ <injar file =" ${ store.jar } " />
53
+ <outjar file =" ${ store.dir } /temp_final.jar" />
54
+
55
+ <libraryjar path =" ${ javac.classpath } " />
56
+ <libraryjar file =" ${ java.home } /lib/rt.jar" />
57
+
58
+ </proguard >
59
+
60
+ <move file =" ${ store.dir } /temp_final.jar" tofile =" ${ obfuscated.jar } " />
40
61
</target >
62
+
41
63
<!--
42
64
43
65
There exist several targets which are by default empty and which can be
Original file line number Diff line number Diff line change
1
+ -target 1.8
2
+
3
+ -printmapping store/out.map
4
+ -printusage store/out.txt
5
+ -keepattributes Signature,InnerClasses
6
+ -keepattributes *Annotation*
7
+
8
+ -dontwarn okio.**
9
+ -dontwarn okhttp3.**
10
+
11
+ -keepclasseswithmembers public class * {
12
+ public static void main(java.lang.String[]);
13
+ }
14
+
15
+ -keep class okio.**
16
+ -keep class okhttp3.** { *; }
17
+ -keep interface okhttp3.** { *; }
18
+
19
+ -keepattributes Signature
20
+ -keepattributes *Annotation*
21
+
22
+ -keepclassmembers enum * {
23
+ public static **[] values();
24
+ public static ** valueOf(java.lang.String);
25
+ }
26
+
27
+ -keep class * extends javax.swing.plaf.ComponentUI {
28
+ public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent);
29
+ }
30
+
31
+ -keepclasseswithmembers,includedescriptorclasses,allowshrinking class * {
32
+ native <methods>;
33
+ }
34
+
35
+ -keep public class * implements com.annimon.ownlang.lib.modules.Module
36
+
37
+ # Soft obfuscation
38
+ -keep public class * {
39
+ public protected *;
40
+ }
41
+
42
+ # Hard obfuscation
43
+ # -optimizationpasses 9
44
+ # -allowaccessmodification
45
+ # -dontusemixedcaseclassnames
46
+ # -repackageclasses ''
You can’t perform that action at this time.
0 commit comments