-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
213 lines (178 loc) · 7.78 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
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<?xml version="1.0" encoding="UTF-8"?>
<!--build_version=3.0-->
<!--
This build script was generated by Codename One to build native mobile applications using Java.
To learn more about Codename One go to https://www.codenameone.com/
-->
<project name="CrispCodenameOneSDK" default="default" basedir=".">
<description>Builds, tests, and runs the project CrispCodenameOneSDK.</description>
<import file="nbproject/build-impl.xml"/>
<property file="codenameone_settings.properties"/>
<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 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.8"
target="1.8"
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.8" />
<property name="javac.target" value="1.8" />
</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"
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" />
<copy file="codenameone_library_appended.properties" todir="build/lib" />
<copy file="codenameone_library_required.properties" todir="build/lib" />
<antcall target="buildNativeIOS" />
<antcall target="buildNativeRIM" />
<antcall target="buildNativeAND" />
<antcall target="buildNativeSE" />
<antcall target="buildNativeWIN" />
<antcall target="buildNativeME" />
<antcall target="buildNativeJS" />
<mkdir dir="dist" />
<zip basedir="build/lib" compress="true" destfile="dist/${application.title}.cn1lib" />
</target>
<target name="buildNativeRIM">
<path id="rimNativeDir">
<fileset dir="native/rim"/>
</path>
<property name="test.rimDir.property" refid="rimNativeDir"/>
<condition property="doesntHaveRimFiles">
<equals arg1="" arg2="${test.rimDir.property}"/>
</condition>
<antcall target="createRimZip" />
</target>
<target name="createRimZip"
unless="doesntHaveRimFiles">
<echo>Zipping rim native code</echo>
<zip basedir="native/rim" compress="false" destfile="build/lib/nativerim.zip" />
</target>
<target name="buildNativeAND">
<path id="andNativeDir">
<fileset dir="native/android"/>
</path>
<property name="test.andDir.property" refid="andNativeDir"/>
<condition property="doesntHaveAndFiles">
<equals arg1="" arg2="${test.andDir.property}"/>
</condition>
<antcall target="createAndZip" />
</target>
<target name="buildNativeSE">
<mkdir dir="native/javase" />
<path id="seNativeDir">
<fileset dir="native/javase"/>
</path>
<property name="test.seDir.property" refid="seNativeDir"/>
<condition property="doesntHaveSeFiles">
<equals arg1="" arg2="${test.seDir.property}"/>
</condition>
<antcall target="createSeZip" />
</target>
<target name="createSeZip"
unless="doesntHaveSeFiles">
<echo>Zipping JavaSE native code</echo>
<zip compress="false" destfile="build/lib/nativese.zip">
<fileset dir="native/javase" excludes="*.jar" />
<!-- Uncomment the line below if you have jar files in your Java SE native code -->
<!-- zipfileset src="native/javase/*.jar"/ -->
</zip>
</target>
<target name="createAndZip"
unless="doesntHaveAndFiles">
<echo>Zipping Android native code</echo>
<zip basedir="native/android" compress="false" destfile="build/lib/nativeand.zip" />
</target>
<target name="buildNativeWIN">
<path id="winNativeDir">
<fileset dir="native/win"/>
</path>
<property name="test.winDir.property" refid="winNativeDir"/>
<condition property="doesntHaveWinFiles">
<equals arg1="" arg2="${test.winDir.property}"/>
</condition>
<antcall target="createWinZip" />
</target>
<target name="createWinZip"
unless="doesntHaveWinFiles">
<echo>Zipping win native code</echo>
<zip basedir="native/win" compress="false" destfile="build/lib/nativewin.zip" />
</target>
<target name="buildNativeIOS">
<path id="iosNativeDir">
<fileset dir="native/ios"/>
</path>
<property name="test.iosDir.property" refid="iosNativeDir"/>
<condition property="doesntHaveIosFiles">
<equals arg1="" arg2="${test.iosDir.property}"/>
</condition>
<antcall target="createIosZip" />
</target>
<target name="createIosZip"
unless="doesntHaveIosFiles">
<echo>Zipping ios native code</echo>
<zip basedir="native/ios" compress="false" destfile="build/lib/nativeios.zip" />
</target>
<target name="buildNativeME">
<path id="meNativeDir">
<fileset dir="native/j2me"/>
</path>
<property name="test.meDir.property" refid="meNativeDir"/>
<condition property="doesntHaveMeFiles">
<equals arg1="" arg2="${test.meDir.property}"/>
</condition>
<antcall target="createMeZip" />
</target>
<target name="createMeZip"
unless="doesntHaveMeFiles">
<echo>Zipping me native code</echo>
<zip basedir="native/j2me" compress="false" destfile="build/lib/nativeme.zip" />
</target>
<target name="buildNativeJS">
<path id="jsNativeDir">
<fileset dir="native/javascript"/>
</path>
<property name="test.jsDir.property" refid="jsNativeDir"/>
<condition property="doesntHaveJsFiles">
<equals arg1="" arg2="${test.jsDir.property}"/>
</condition>
<antcall target="createJsZip" />
</target>
<target name="createJsZip"
unless="doesntHaveJsFiles">
<echo>Zipping javascript native code</echo>
<zip basedir="native/javascript" compress="false" destfile="build/lib/nativejavascript.zip" />
</target>
</project>