Repository navigation
Expand file tree
/
Copy pathbuild.xml
More file actions
114 lines (111 loc) · 4.7 KB
/
Copy pathbuild.xml
File metadata and controls
114 lines (111 loc) · 4.7 KB
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="build-all" name="PubnubApi">
<exec executable="git" outputproperty="git.branch"
failifexecutionfails="false">
<arg line="rev-parse --abbrev-ref HEAD"/>
</exec>
<exec executable="git" outputproperty="git.revision" failifexecutionfails="false" errorproperty="">
<arg value="rev-parse"/>
<arg value="--short"/>
<arg value="HEAD"/>
</exec>
<loadfile property="VERSION1" srcFile="../VERSION"><filterchain><striplinebreaks/></filterchain></loadfile>
<condition property="isMaster">
<equals arg1="${git.branch}" arg2="master" />
</condition>
<condition property="VERSION" value="${VERSION1}" else="${VERSION1}-${git.branch}-${git.revision}">
<isset property="isMaster"/>
</condition>
<property environment="env"/>
<property name="VERSION" value="${VERSION1}-${git.branch}"/>
<property name="pubnub_lib_jar" value="Pubnub-MicroEdition-${VERSION}.jar"/>
<property name="pubnub_debug_lib_jar" value="Pubnub-MicroEdition-Debug-${VERSION}.jar"/>
<property name="srcPubnubApi.link" value="../java/srcPubnubApi"/>
<property name="target" value="1.1"/>
<property name="source" value="1.3"/>
<path id="PubnubApi.classpath">
<pathelement location="bin"/>
<pathelement location="libs/cldc_1.1.jar"/>
<pathelement location="libs/jsr177_1.0.jar"/>
<pathelement location="libs/midp_2.0.jar"/>
<pathelement location="libs/bouncycastle.jar"/>
<pathelement location="libs/jsonme.jar"/>
<pathelement location="libs/tinylinegzip.jar"/>
</path>
<target name="test" />
<target name="build-all" depends="clean, debug-build, clean, build" />
<target name="deploy-all" />
<target name="setJsonMeJar" >
<replace dir="${srcPubnubApi.link}" token="org.json" value="org.json.me">
<include name="**/*.java"/>
</replace>
</target>
<target name="unsetJsonMeJar" >
<replace dir="${srcPubnubApi.link}" token="org.json.me" value="org.json">
<include name="**/*.java"/>
</replace>
</target>
<target depends="setJsonMeJar" name="init">
<mkdir dir="bin"/>
<copy includeemptydirs="false" todir="bin">
<fileset dir="${srcPubnubApi.link}">
<exclude name="**/*.launch"/>
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target depends="unsetJsonMeJar" name="clean">
<delete dir="bin"/>
</target>
<target depends="clean" name="cleanall"/>
<target name="setDebugTrue" >
<replace dir="${srcPubnubApi.link}" token="boolean LOGGING = false" value="boolean LOGGING = true">
<include name="**/*.java"/>
</replace>
</target>
<target name="unsetDebugTrue" >
<replace dir="${srcPubnubApi.link}" token="boolean LOGGING = true" value="boolean LOGGING = false">
<include name="**/*.java"/>
</replace>
</target>
<target name="build" depends="clean">
<delete file="${pubnub_lib_jar}"/>
<antcall target="build-jar">
<param name="jar_name" value="${pubnub_lib_jar}" />
<param name="debug" value="false" />
</antcall>
</target>
<target name="debug-build" depends="clean">
<delete file="${pubnub_debug_lib_jar}"/>
<antcall target="setDebugTrue" />
<antcall target="build-jar">
<param name="jar_name" value="${pubnub_debug_lib_jar}" />
<param name="debug" value="true" />
</antcall>
<antcall target="unsetDebugTrue" />
</target>
<target depends="create-jar, clean" name="build-jar"/>
<target depends="build-project" name="create-jar">
<jar destfile="${jar_name}"
basedir="bin"
includes="**/**"
/>
</target>
<target depends="init" name="build-project">
<echo message="${ant.project.name}: ${ant.file}"/>
<replace dir="${srcPubnubApi.link}" token='static String VERSION = ""' value='static String VERSION = "${VERSION}"' >
<include name="**/*.java"/>
</replace>
<javac debug="${debug}" destdir="bin" source="${source}" target="${target}">
<src path="${srcPubnubApi.link}"/>
<src path="src"/>
<src path="src1"/>
<src path="srcLogging"/>
<src path="../java/srcCrypto"/>
<classpath refid="PubnubApi.classpath"/>
</javac>
<replace dir="${srcPubnubApi.link}" token='static String VERSION = "${VERSION}"' value='static String VERSION = ""'>
<include name="**/*.java"/>
</replace>
</target>
</project>