-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
executable file
·51 lines (44 loc) · 1.76 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
<project name="MemDefender" basedir=".">
<description>
Builds the MemDefender Java agent.
</description>
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<target name="init" description="Build initialization">
<mkdir dir="${build}"/>
<mkdir dir="${dist}"/>
</target>
<path id="MemDefender.classpath">
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</path>
<target name="base_compile" depends="init" description="basic compile">
<javac srcdir="${src}" destdir="${build}" includeantruntime="false">
<classpath refid="MemDefender.classpath"/>
</javac>
</target>
<target name="build.javaagent" depends="base_compile" description="Build jar of javaagent, include manifest">
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask"
classpath="lib/jarjar-1.0.jar" />
<jarjar destfile="${dist}/MemDefender.jar">
<manifest>
<attribute name="Boot-Class-Path" value="./MemDefender.jar"/>
<attribute name="Premain-Class" value="org.uniHD.memory.MemDefenderAgent"/>
<attribute name="Can-Redefine-Classes" value="true" />
<attribute name="Can-Retransform-Classes" value="true" />
<attribute name="Main-Class" value="NotSuitableAsMain" />
</manifest>
<fileset dir="${build}"/>
<zipfileset src="lib/java-allocation-instrumenter-3.2.0.jar"/>
<zipfileset src="lib/flogger-0.4.jar"/>
<zipfileset src="lib/flogger-system-backend-0.4.jar"/>
</jarjar>
</target>
<target name="clean" description="clean up" >
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
<target name="all" depends="build.javaagent" description="build all"/>
</project>