forked from ringcentral/pubnub-jtools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
74 lines (72 loc) · 3.25 KB
/
build.xml
File metadata and controls
74 lines (72 loc) · 3.25 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="build" name="PubnubApi">
<property environment="env"/>
<loadfile property="VERSION" srcFile="../VERSION"><filterchain><striplinebreaks/></filterchain></loadfile>
<property name="pubnub_lib_jar" value="Pubnub-Android-${VERSION}.jar"/>
<property name="java_core_path" value="../java"/>
<property name="src_pubnub_api_path" value="${java_core_path}/srcPubnubApi"/>
<property name="src_java_path" value="${java_core_path}/src1"/>
<property name="src_logging_path" value="./srcLogging"/>
<property name="src_android_path" value="./src"/>
<property name="android_jar_path" value="jars"/>
<property name="target" value="1.5"/>
<property name="source" value="1.5"/>
<path id="classpath">
<pathelement location="bin"/>
<pathelement location="${java_core_path}/libs/bcprov-jdk15on-1.47.jar"/>
<pathelement location="libs/android-8.jar"/>
</path>
<target name="test" />
<target name="setDebugTrue" >
<replace dir="${src_pubnub_api_path}" token="boolean LOGGING = false" value="boolean LOGGING = true">
<include name="**/*.java"/>
</replace>
</target>
<target name="unsetDebugTrue" >
<replace dir="${src_pubnub_api_path}" token="boolean LOGGING = true" value="boolean LOGGING = false">
<include name="**/*.java"/>
</replace>
</target>
<target depends="setDebugTrue,build,unsetDebugTrue" name="debug-build"/>
<target name="init">
<mkdir dir="bin"/>
<copy includeemptydirs="false" todir="bin">
<fileset dir="${src_pubnub_api_path}">
<exclude name="**/*.launch"/>
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="bin"/>
<delete file="${pubnub_lib_jar}"/>
</target>
<target depends="clean" name="cleanall"/>
<target depends="copy_jars_to_examples" name="build"/>
<target depends="create-jar" name="copy_jars_to_examples">
<copy file="${pubnub_lib_jar}" todir="./examples/PubnubExample/libs/"/>
<copy file="${pubnub_lib_jar}" todir="./examples/SubscribeAtBoot/libs/"/>
</target>
<target depends="build-project" name="create-jar">
<jar destfile="${pubnub_lib_jar}"
basedir="bin"
includes="**/**"
/>
</target>
<target depends="init" name="build-project">
<echo message="${ant.project.name}: ${ant.file}"/>
<replace dir="${src_pubnub_api_path}" token='protected static String VERSION = ""' value='protected static String VERSION = "${VERSION}"' >
<include name="**/*.java"/>
</replace>
<javac destdir="bin" source="${source}" target="${target}">
<src path="${src_pubnub_api_path}"/>
<src path="${src_java_path}"/>
<src path="${src_logging_path}"/>
<src path="${src_android_path}"/>
<classpath refid="classpath"/>
</javac>
<replace dir="${src_pubnub_api_path}" token='protected static String VERSION = "${VERSION}"' value='protected static String VERSION = ""'>
<include name="**/*.java"/>
</replace>
</target>
</project>