Repository navigation
Expand file tree
/
Copy pathbuild.xml
More file actions
126 lines (110 loc) · 5 KB
/
Copy pathbuild.xml
File metadata and controls
126 lines (110 loc) · 5 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
115
116
117
118
119
120
121
122
123
124
125
126
<?xml version="1.0" encoding="UTF-8"?>
<!--build_version=1.3-->
<project name="PubnubClientSDK" default="build-all" basedir=".">
<description>Builds, tests, and runs the project PubnubClientSDK.</description>
<import file="nbproject/build-impl.xml"/>
<loadfile property="VERSION" srcFile="../../VERSION"><filterchain><striplinebreaks/></filterchain></loadfile>
<property name="pubnub_cn1lib_file_name" value="../Pubnub-CodeNameOne-${VERSION}.cn1lib"/>
<property name="pubnub_debug_cn1lib_file_name" value="../Pubnub-CodeNameOne-Debug-${VERSION}.cn1lib"/>
<property file="codenameone_settings.properties"/>
<target name="build-all" depends="clean, debug-build, clean, build" />
<target name="deploy-all" />
<target name="create-src">
<mkdir dir="src"/>
<copy includeemptydirs="true" todir="src">
<fileset dir="../../java/srcCrypto"/>
</copy>
<copy includeemptydirs="true" todir="src">
<fileset dir="../../java/srcPubnubApi"/>
</copy>
<copy includeemptydirs="true" todir="src/com/codename1">
<fileset dir="../src/com/codename1"/>
</copy>
<copy includeemptydirs="true" todir="src/com/pubnub/api">
<fileset dir="../src/com/pubnub/api/"/>
</copy>
</target>
<target name="delete-src">
<delete dir="src"/>
</target>
<target name="copy-lib">
<copy file="dist/PubnubClientSDK.cn1lib" tofile="${jar_name}"/>
</target>
<target name="setDebugTrue" >
<replace dir="../../java/srcPubnubApi" token="boolean LOGGING = false" value="boolean LOGGING = true">
<include name="**/*.java"/>
</replace>
</target>
<target name="unsetDebugTrue" >
<replace dir="../../java/srcPubnubApi" token="boolean LOGGING = true" value="boolean LOGGING = false">
<include name="**/*.java"/>
</replace>
</target>
<target name="debug-build" depends="clean">
<delete file="${pubnub_debug_cn1lib_file_name}"/>
<antcall target="build-lib">
<param name="jar_name" value="${pubnub_debug_cn1lib_file_name}" />
</antcall>
</target>
<target name="build" depends="clean">
<delete file="${pubnub_cn1lib_file_name}"/>
<antcall target="build-lib">
<param name="jar_name" value="${pubnub_cn1lib_file_name}" />
</antcall>
</target>
<target depends="create-src, default, delete-src, copy-lib, clean" name="build-lib">
</target>
<target depends="init,compile,jar" name="compile-test">
</target>
<target depends="compile-test" name="-do-test-run">
</target>
<target depends="-do-test-run" description="Run unit tests." name="test">
<echo>Currently testing a library project isn't supported</echo>
</target>
<target depends="create-src" name="-pre-compile">
<echo>Compile is forcing compliance to the supported API's/features for maximum device compatibility. This allows smaller
code size and wider device support</echo>
<mkdir dir="build/tmp"/>
<javac destdir="build/tmp"
source="1.5"
target="1.5"
bootclasspath="lib/CLDC11.jar"
classpath="${javac.classpath}:${build.classes.dir}">
<src path="${src.dir}"/>
</javac>
</target>
<target name="-pre-init">
<property name="javac.source" value="1.5" />
<property name="javac.target" value="1.5" />
</target>
<target name="run">
<echo>You can't run a library project</echo>
</target>
<target name="debug">
<echo>You can't run a library project</echo>
</target>
<target name="Stubs">
<delete dir="build/stubs"/>
<javadoc sourcepath="src"
classpath="lib/CodenameOne.jar:lib/CLDC11.jar:lib/bccn1/bouncycastle.zip:lib/json/json.zip"
docletpath="Stubber.jar"
doclet="com.codename1.build.client.StubGenerator">
<fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}">
<filename name="**/*.java"/>
</fileset>
</javadoc>
</target>
<target name="jar" depends="compile, Stubs">
<mkdir dir="build/lib" />
<zip basedir="${build.classes.dir}" compress="false" destfile="build/lib/main.zip" />
<zip basedir="build/stubs" compress="false" destfile="build/lib/stubs.zip" />
<copy file="manifest.properties" todir="build/lib" />
<!--<antcall target="buildNativeIOS" />
<antcall target="buildNativeRIM" />
<antcall target="buildNativeAND" />
<antcall target="buildNativeWIN" />
<antcall target="buildNativeME" /> -->
<mkdir dir="dist" />
<zip basedir="build/lib" compress="true" destfile="dist/${application.title}.cn1lib" />
</target>
</project>