This repository has been archived by the owner on Nov 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
/
build.xml
79 lines (65 loc) · 2.79 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="jar" name="KPVBooklet">
<property name="main-class" value="com.github.chrox.kpvbooklet.KPVBooklet"/>
<property environment="env"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.4"/>
<property name="source" value="1.4"/>
<!-- environment variable for the location of Amazon's jar files -->
<target name="checkProperties">
<fail unless="env.KINDLE_EBOOK">"KINDLE_EBOOK must be set</fail>
<echo message="KINDLE_EBOOK is set to = ${env.KINDLE_EBOOK}"/>
</target>
<path id="local.classpath">
<pathelement location="${env.KINDLE_EBOOK}/lib/json_simple-1.1.jar"/>
<pathelement location="${env.KINDLE_EBOOK}/lib/utilities.jar"/>
<pathelement location="${env.KINDLE_EBOOK}/lib/kaf.jar"/>
<pathelement location="${env.KINDLE_EBOOK}/lib/kafui.jar"/>
<pathelement location="${env.KINDLE_EBOOK}/lib/kxml2.jar"/>
<pathelement location="${env.KINDLE_EBOOK}/lib/ReaderSDK.jar"/>
<pathelement location="${env.KINDLE_EBOOK}/lib/ReaderContentSDK.jar"/>
<pathelement location="${env.KINDLE_EBOOK}/booklet/Reader.jar"/>
<pathelement location="${env.KINDLE_EBOOK}/booklet/AbstractReaderBooklet.jar"/>
<pathelement location="${env.KINDLE_EBOOK}/lib/concierge-1.0.0.jar"/>
</path>
<target name="compile" depends="checkProperties">
<mkdir dir="build/classes"/>
<javac debug="true" debuglevel="${debuglevel}" destdir="build/classes" includeantruntime="false" source="${source}" target="${target}">
<src path="src"/>
<classpath refid="local.classpath"/>
</javac>
</target>
<target name="jar" depends="compile">
<mkdir dir="build/jar"/>
<jar destfile="build/jar/${ant.project.name}.jar" basedir="build/classes">
<manifest>
<attribute name="Main-Class" value="${main-class}"/>
</manifest>
</jar>
</target>
<target name="bin" depends="jar">
<exec executable="bash">
<arg line="./build-updates.sh"/>
</exec>
</target>
<target name="clean">
<delete dir="build"/>
</target>
<target name="clean-build" depends="clean,jar"/>
<target name="dev" depends="jar">
<exec executable="ssh">
<arg line="root@kindle '/usr/sbin/mntroot rw'"/>
</exec>
<exec executable="scp">
<arg line="build/jar/${ant.project.name}.jar root@kindle:/opt/amazon/ebook/booklet/${ant.project.name}.jar"/>
</exec>
<exec executable="ssh">
<arg line="root@kindle '/usr/sbin/mntroot ro'"/>
</exec>
</target>
<target name="dev+restart" depends="dev">
<exec executable="ssh">
<arg line="root@kindle '/sbin/restart framework &'"/>
</exec>
</target>
</project>