-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
69 lines (59 loc) · 2.75 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
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="applet" name="NeoPGP Applet">
<mkdir dir="lib" />
<get src="https://github.com/martinpaljak/ant-javacard/releases/latest/download/ant-javacard.jar" dest="lib" skipexisting="true" />
<get src="https://github.com/licel/jcardsim/raw/2d5a694d0023e8f2256df65b7f905382e4c70ff5/jcardsim-3.0.5-SNAPSHOT.jar" dest="lib" skipexisting="true" />
<get src="https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar" dest="lib" skipexisting="true" />
<get src="https://repo1.maven.org/maven2/junit/junit/4.13.2/junit-4.13.2.jar" dest="lib" skipexisting="true" />
<property name="ant.classes.dir" value="build/classes" />
<property name="main.build.dir" value="build/main" />
<property name="main.src.dir" value="src" />
<property name="test.build.dir" value="build/test" />
<property name="test.src.dir" value="test" />
<taskdef name="javacard" classname="pro.javacard.ant.JavaCard" classpath="lib/ant-javacard.jar" />
<target name="applet">
<javacard>
<cap output="NeoPGPApplet.cap" targetsdk="3.0.4" sources="${main.src.dir}" includes="cc/walle/neopgp/*.java" classes="${ant.classes.dir}" aid="d27600012401" version="1.0">
<applet class="cc.walle.neopgp.NeoPGPApplet" aid="d2760001240103040010000000000000" />
</cap>
</javacard>
</target>
<path id="classpath.main">
<pathelement location="lib/jcardsim-3.0.5-SNAPSHOT.jar" />
</path>
<path id="classpath.test">
<pathelement location="${main.build.dir}" />
<pathelement location="lib/junit-4.13.2.jar" />
<pathelement location="lib/hamcrest-core-1.3.jar" />
<pathelement location="lib/jcardsim-3.0.5-SNAPSHOT.jar" />
</path>
<target name="compile">
<mkdir dir="${main.build.dir}" />
<javac srcdir="${main.src.dir}" destdir="${main.build.dir}" debug="true" includeantruntime="false">
<classpath refid="classpath.main" />
</javac>
</target>
<target name="test-compile" depends="compile">
<mkdir dir="${test.build.dir}" />
<javac srcdir="${test.src.dir}" destdir="${test.build.dir}" debug="true" includeantruntime="false">
<classpath refid="classpath.test" />
</javac>
</target>
<target name="test" depends="test-compile">
<junit printsummary="on" haltonfailure="yes" fork="true">
<classpath>
<path refid="classpath.test"/>
<pathelement location="${test.build.dir}" />
</classpath>
<formatter type="brief" usefile="false" />
<batchtest>
<fileset dir="${test.src.dir}" includes="**/*Test.java" />
</batchtest>
</junit>
</target>
<target name="clean">
<delete dir="build" />
<delete file="javacardx.framework.tlv.cap" />
<delete file="NeoPGPApplet.cap" />
</target>
</project>