-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
125 lines (99 loc) · 3.82 KB
/
build.xml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<project name="VariabilitySpec" basedir=".">
<property name="version">1.0.0</property>
<property name="dir.src">src</property>
<property name="dir.build">out</property>
<property name="dir.build.production">${dir.build}/production/variabilitySpec</property>
<property name="dir.build.artifacts">${dir.build}/artifacts/variabilitySpec</property>
<property name="file.jar">${dir.build.artifacts}/variabilitySpec-${version}.jar</property>
<property name="file.jar.final">${dir.build.artifacts}/variabilitySpec-${version}.final.jar</property>
<path id="projectClasspath">
<fileset dir="lib">
<include name="ee.ut-log-pnml-utils.jar"/>
<include name="eventstr-comparison.jar"/>
<include name="guava-18.0.jar"/>
<include name="jaxen-1.1.6.jar"/>
<include name="jdom.jar"/>
<include name="PetriNets.jar"/>
<include name="pnapi-1.0.jar"/>
<include name="umaBPDiff-1.0.jar"/>
<include name="unfolding.jar"/>
</fileset>
</path>
<target name="clean">
<delete dir="${dir.build}"/>
</target>
<target name="init">
<mkdir dir="${dir.build}"/>
<mkdir dir="${dir.build.production}"/>
<mkdir dir="${dir.build.artifacts}"/>
</target>
<target name="compile" depends="init">
<echo>Compiling Java source</echo>
<javac classpathref="projectClasspath"
srcdir="${dir.src}"
destdir="${dir.build.production}" />
</target>
<target name="unzip-jars">
<patternset id="classes">
<include name="**/*.class"/>
</patternset>
<unjar dest="${dir.build.production}">
<patternset refid="classes" />
<fileset dir="lib" includes="*.jar" excludes="proguard.jar"/>
</unjar>
</target>
<target name="jar" depends="compile,unzip-jars">
<echo>Making JAR file</echo>
<jar basedir="${dir.build.production}"
file="${file.jar}">
<manifest>
<attribute name="Main-Class" value="nl.rug.ds.bpm.variability.specification.tool.VariabilitySpecGen"/>
</manifest>
</jar>
</target>
<target name="shrink" depends="jar">
<taskdef resource="proguard/ant/task.properties"
classpath="lib/proguard.jar" />
<proguard obfuscate="false" optimize="false">
-injars ${file.jar}
-outjars ${file.jar.final}
-libraryjars ${java.home}/lib/rt.jar
-dontoptimize
-dontobfuscate
<!-- Preserve all annotations. -->
-keepattributes *Annotation*
<!-- Preserve all public applications. -->
-keepclasseswithmembers public class * {
public static void main(java.lang.String[]);
}
<!-- Preserve all native method names and the names of their classes. -->
-keepclasseswithmembernames class * {
native <methods>;
}
<!-- Preserve the methods that are required in all enumeration classes. -->
-keepclassmembers,allowoptimization enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
<!-- Explicitly preserve all serialization members. The Serializable
interface is only a marker interface, so it wouldn't save them.
You can comment this out if your library doesn't use serialization.
If your code contains serializable classes that have to be backward
compatible, please refer to the manual. -->
-keepclassmembers class * implements java.io.Serializable {
static final long serialVersionUID;
static final java.io.ObjectStreamField[] serialPersistentFields;
private void writeObject(java.io.ObjectOutputStream);
private void readObject(java.io.ObjectInputStream);
java.lang.Object writeReplace();
java.lang.Object readResolve();
}
<!-- Your application may contain more items that need to be preserved;
typically classes that are dynamically created using Class.forName -->
-keep public class * extends org.jdom
-keep public class * extends org.apache.xerces
-ignorewarnings
</proguard>
<delete file="${file.jar}"/>
</target>
</project>