-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.xml
71 lines (52 loc) · 1.94 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
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:ivy="antlib:org.apache.ivy.ant" name="pkcs11" basedir="." default="dist">
<property file="../jcesigner.cfg" />
<property name="build" location="build"/>
<!-- Default used when build outside CI -->
<property name="build_id" value="local"/>
<property name="publishresolver" value="local"/>
<path id="project.class.path">
<fileset dir="java/lib">
<include name="*.jar"/>
</fileset>
</path>
<target name="init">
<tstamp />
<mkdir dir="${build}"/>
<property name="ivy.settings.file" value="../ivysettings.xml" />
<property name="ivy.settings.url" value="http://jenkins.mi.cardcontact.de/ivysettings.xml" />
<ivy:configure />
</target>
<target name="resolve" depends="init">
<ivy:retrieve pattern="java/lib/[artifact]-[revision].[ext]"/>
</target>
<target name="compile" depends="resolve">
<mkdir dir="${build}/bin"/>
<javac encoding="8859_1" srcdir="${basedir}/java/src" destdir="${build}/bin" source="1.7" target="1.7">
<classpath refid="project.class.path"/>
<exclude name="**/.git"/>
</javac>
</target>
<target name="dist" depends="compile" >
<mkdir dir="${build}/lib"/>
<jar jarfile="${build}/lib/opensc-java.jar" basedir="${build}/bin"/>
<copy todir="${build}/lib">
<fileset dir="${basedir}/jni/prebuild">
<include name="*"/>
</fileset>
</copy>
<delete dir="${build}/bin"/>
</target>
<target name="sign_jar" depends="dist">
<signjar jar="${build}/lib/opensc-java.jar" keystore="${jarsigner.keystore}" alias="${jarsigner.alias}" storepass="${jarsigner.password}"/>
</target>
<target name="ivypublish" depends="sign_jar">
<ivy:publish resolver="${publishresolver}" pubrevision="0.4.${build_id}" forcedeliver="true">
<artifacts pattern="build/lib/[artifact].[ext]" />
</ivy:publish>
</target>
<target name="clean">
<delete dir="${build}"/>
<delete dir="${basedir}/java/lib"/>
</target>
</project>