-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcustom_rules.xml
More file actions
55 lines (52 loc) · 2.63 KB
/
custom_rules.xml
File metadata and controls
55 lines (52 loc) · 2.63 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?xml version="1.0" encoding="UTF-8"?>
<project name="scala-android">
<target name="-pre-compile">
<!-- structure copied from compile target -->
<do-only-if-manifest-hasCode elseText="hasCode = false. Skipping...">
<taskdef resource="scala/tools/ant/antlib.xml"
classpath="tools/scala-compiler.jar:tools/scala-library.jar" />
<scalac force="changed" deprecation="on"
destdir="${out.classes.absolute.dir}"
bootclasspath="${android.target.classpath}">
<src path="${source.absolute.dir}" />
<src path="${gen.absolute.dir}" />
<classpath>
<fileset dir="${jar.libs.absolute.dir}" includes="*.jar" />
<fileset dir="tools" includes="*.jar"/>
</classpath>
</scalac>
</do-only-if-manifest-hasCode>
</target>
<target name="-post-compile">
<!-- input for dex will be proguard's output -->
<!-- TODO: unfortunately, this completely bypasses the obfuscate target -->
<property name="out.dex.input.absolute.dir" value="${out.absolute.dir}/classes.min.jar" />
<path id="out.dex.jar.input.ref" />
<!-- set paths, copied from obfuscate target -->
<path id="proguard.configpath">
<pathelement path="${proguard.config}"/>
</path>
<pathconvert pathsep='" -include "' property="proguard.configcmd" refid="proguard.configpath"/>
<taskdef resource="proguard/ant/task.properties"
classpath="tools/proguard.jar" />
<!-- execute proguard -->
<proguard>
-include "${proguard.configcmd}"
-injars ${out.classes.absolute.dir}:tools/scala-library.jar(!META-INF/MANIFEST.MF,!library.properties)
-outjars "${out.absolute.dir}/classes.min.jar"
-libraryjars "${android.jar}"
-dontwarn scala.**
-dontwarn sun.**
-dontoptimize
-dontobfuscate
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService
</proguard>
</target>
</project>