-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
97 lines (82 loc) · 3.28 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="azw2" name="HelloWorld">
<property file="kindlet.properties"/>
<taskdef name="retroweaver" classname="net.sourceforge.retroweaver.ant.RetroWeaverTask">
<classpath>
<pathelement location="lib/retroweaver-all-2.0.7.jar" />
</classpath>
</taskdef>
<property environment="env" />
<property name="debuglevel" value="source,lines,vars" />
<property name="target" value="1.5" />
<property name="source" value="1.5" />
<property name="keystorePath" value="signing/developer.keystore" />
<property name="keystorePass" value="password" />
<property name="signName" value="test" />
<property name="kindleIP" value="192.168.15.244" />
<path id="app.classpath">
<pathelement location="bin" />
<pathelement location="lib/${kindlet_jar}" />
</path>
<target name="init">
<mkdir dir="bin" />
<copy includeemptydirs="false" todir="bin">
<fileset dir="src">
<exclude name="**/*.launch" />
<exclude name="**/*.java" />
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="bin" />
</target>
<target name="doc" depends="build">
<javadoc sourcepath="src" destdir="doc" classpathref="app.classpath" />
</target>
<target depends="clean" name="cleanall" />
<target name="weave" depends="build">
<unzip src="lib/asm-3.1.jar" dest="bin" />
<unzip src="lib/retroweaver-rt-2.0.7.jar" dest="bin" />
<exec dir="bin" executable="${java_path}/java">
<arg value="-cp"/>
<arg value="${user.dir}/lib/retroweaver-all-2.0.7.jar" />
<arg value="net.sourceforge.retroweaver.Weaver"/>
<arg value="-source" />
<arg value="${user.dir}/bin" />
</exec>
</target>
<!--<target name="weave" depends="build">-->
<!-- <unzip src="lib/asm-3.1.jar" dest="bin" />-->
<!-- <unzip src="lib/retroweaver-rt-2.0.7.jar" dest="bin" />-->
<!-- <retroweaver srcdir="bin" />-->
<!--</target>-->
<target name="jar" depends="weave">
<jar destfile="${ant.project.name}.jar"
manifest="kindlet.manifest">
<fileset dir="bin"/>
<fileset dir="." includes="res/**"/>
</jar>
</target>
<target depends="init" name="build">
<echo message="${ant.project.name}: ${ant.file}" />
<javac executable="${java_path}/javac" debug="true" fork="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}" >
<src path="src" />
<classpath refid="app.classpath" />
</javac>
</target>
<target name="sign" depends="jar">
<signjar executable="${java_path}/jarsigner" jar="${ant.project.name}.jar" alias="dn${signName}" storepass="${keystorePass}" keystore="${keystorePath}" />
<signjar executable="${java_path}/jarsigner" jar="${ant.project.name}.jar" alias="di${signName}" storepass="${keystorePass}" keystore="${keystorePath}" />
<signjar executable="${java_path}/jarsigner" jar="${ant.project.name}.jar" alias="dk${signName}" storepass="${keystorePass}" keystore="${keystorePath}" />
<!--digestalg="SHA1" sigalg="SHA1withDSA"-->
</target>
<target name="azw2" depends="sign">
<move file="${ant.project.name}.jar" tofile="${ant.project.name}.azw2" />
</target>
<target name="deploy" depends="azw2">
<exec executable="./deploy.sh">
<arg value="${ant.project.name}.azw2" />
<arg value="${kindleIP}" />
</exec>
</target>
</project>