1 <project name="gdx" default="all" basedir=".">
\r
2 <description>libgdx distribution build file</description>
\r
3 <property environment="env" />
\r
5 <!-- ndk directory -->
\r
6 <property name="env.NDK_HOME" value="/home/mzechner/android-ndk-r5"/>
\r
8 <!-- library version -->
\r
9 <property name="version" value="0.9.3"/>
\r
11 <!-- define distribution/output directory -->
\r
12 <property name="distDir" value="${basedir}/dist"/>
\r
14 <!-- should we build natives? -->
\r
15 <property name="build-natives" value="false"/>
\r
17 <!-- clean distribution/output directory -->
\r
18 <target name="clean">
\r
19 <delete dir="${distDir}"/>
\r
22 <!-- build the core of the library plus all backends -->
\r
24 <target name="gdx-jnigen">
\r
25 <ant antfile="../../build-template.xml" dir="extensions/gdx-jnigen">
\r
26 <property name="distDir" value="${distDir}/extensions"/>
\r
27 <property name="jar" value="gdx-jnigen"/>
\r
28 <!-- we shouldn't build any natives -->
\r
29 <property name="build-natives" value="false"/>
\r
33 <!-- gdx setup ui, custom target -->
\r
34 <target name="gdx-setup-ui">
\r
35 <ant antfile="build.xml" dir="extensions/gdx-setup-ui/"/>
\r
36 <copy tofile="${distDir}/gdx-setup-ui.jar" file="extensions/gdx-setup-ui/gdx-setup-ui.jar"/>
\r
40 <target name="gdx-core" depends="gdx-jnigen">
\r
41 <path id="classpath">
\r
42 <pathelement location="${distDir}/extensions/gdx-jnigen.jar"/>
\r
44 <ant antfile="../build-template.xml" dir="gdx">
\r
45 <property name="jar" value="gdx"/>
\r
46 <reference refid="classpath"/>
\r
48 <!-- the ndk clean process deletes all shared libs in libs/armeabi(-v7a), need to copy
\r
49 the GLES 2.0 bindings manually... -->
\r
50 <copy tofile="${distDir}/armeabi/libandroidgl20.so" file="gdx/dist/armeabi/libandroidgl20.so"/>
\r
51 <copy tofile="${distDir}/armeabi-v7a/libandroidgl20.so" file="gdx/dist/armeabi/libandroidgl20.so"/>
\r
54 <!-- gdx openal, for all desktop backends -->
\r
55 <target name="gdx-openal" depends="gdx-core">
\r
56 <path id="classpath">
\r
57 <pathelement location="${distDir}/gdx.jar"/>
\r
59 <ant antfile="../../build-template.xml" dir="backends/gdx-openal">
\r
60 <property name="jar" value="gdx-openal"/>
\r
61 <reference refid="classpath"/>
\r
65 <!-- gdx lwjgl backend -->
\r
66 <target name="gdx-backend-lwjgl" depends="gdx-core,gdx-openal">
\r
67 <path id="classpath">
\r
68 <pathelement location="${distDir}/gdx.jar"/>
\r
69 <pathelement location="${distDir}/gdx-openal.jar"/>
\r
71 <zipfileset id="jarfiles" src="${distDir}/gdx-openal.jar"/>
\r
72 <ant antfile="../../build-template.xml" dir="backends/gdx-backend-lwjgl">
\r
73 <property name="jar" value="gdx-backend-lwjgl"/>
\r
74 <reference refid="classpath"/>
\r
75 <reference refid="jarfiles"/>
\r
79 <!-- gdx android backend -->
\r
80 <target name="gdx-backend-android" depends="gdx-core">
\r
81 <path id="classpath">
\r
82 <pathelement location="${distDir}/gdx.jar"/>
\r
84 <ant antfile="../../build-template.xml" dir="backends/gdx-backend-android">
\r
85 <property name="jar" value="gdx-backend-android"/>
\r
86 <reference refid="classpath"/>
\r
90 <!-- gdx gwt backend -->
\r
91 <target name="gdx-backend-gwt" depends="gdx-core">
\r
92 <path id="classpath">
\r
93 <pathelement location="${distDir}/gdx.jar"/>
\r
95 <ant antfile="../../build-template.xml" dir="backends/gdx-backends-gwt">
\r
96 <property name="jar" value="gdx-backend-gwt"/>
\r
97 <reference refid="classpath"/>
\r
98 <reference refid="jarfiles"/>
\r
102 <!-- build the extensions -->
\r
104 <target name="gdx-tools" depends="gdx-core,gdx-backend-lwjgl,gdx-backend-lwjgl">
\r
105 <path id="classpath">
\r
106 <pathelement location="${distDir}/gdx.jar"/>
\r
107 <pathelement location="${distDir}/gdx-backend-lwjgl.jar"/>
\r
109 <ant antfile="../../build-template.xml" dir="extensions/gdx-tools">
\r
110 <property name="distDir" value="${distDir}/extensions"/>
\r
111 <property name="jar" value="gdx-tools"/>
\r
112 <reference refid="classpath"/>
\r
116 <!-- gdx tiled processor -->
\r
117 <target name="gdx-tiled-preprocessor" depends="gdx-core">
\r
118 <path id="classpath">
\r
119 <pathelement location="${distDir}/gdx.jar"/>
\r
120 <pathelement location="${distDir}/gdx-backend-lwjgl.jar"/>
\r
121 <pathelement location="${distDir}/extensions/gdx-tools.jar"/>
\r
123 <ant antfile="../../build-template.xml" dir="extensions/gdx-tiled-preprocessor">
\r
124 <property name="distDir" value="${distDir}/extensions"/>
\r
125 <property name="jar" value="gdx-tiled-preprocessor"/>
\r
126 <reference refid="classpath"/>
\r
131 <target name="gdx-image" depends="gdx-core">
\r
132 <path id="classpath">
\r
133 <pathelement location="${distDir}/gdx.jar"/>
\r
134 <pathelement location="${distDir}/extensions/gdx-jnigen.jar"/>
\r
136 <ant antfile="../../build-template.xml" dir="extensions/gdx-image">
\r
137 <property name="distDir" value="${distDir}/extensions"/>
\r
138 <property name="jar" value="gdx-image"/>
\r
139 <reference refid="classpath"/>
\r
144 <target name="gdx-audio" depends="gdx-core">
\r
145 <path id="classpath">
\r
146 <pathelement location="${distDir}/gdx.jar"/>
\r
147 <pathelement location="${distDir}/extensions/gdx-jnigen.jar"/>
\r
149 <ant antfile="../../build-template.xml" dir="extensions/gdx-audio">
\r
150 <property name="distDir" value="${distDir}/extensions"/>
\r
151 <property name="jar" value="gdx-audio"/>
\r
152 <reference refid="classpath"/>
\r
156 <!-- gdx freetype -->
\r
157 <target name="gdx-freetype" depends="gdx-core">
\r
158 <path id="classpath">
\r
159 <pathelement location="${distDir}/gdx.jar"/>
\r
160 <pathelement location="${distDir}/extensions/gdx-jnigen.jar"/>
\r
162 <ant antfile="../../build-template.xml" dir="extensions/gdx-freetype">
\r
163 <property name="distDir" value="${distDir}/extensions"/>
\r
164 <property name="jar" value="gdx-freetype"/>
\r
165 <reference refid="classpath"/>
\r
169 <!-- gdx bullet -->
\r
170 <target name="gdx-bullet" depends="gdx-core">
\r
171 <path id="classpath">
\r
172 <pathelement location="${distDir}/gdx.jar"/>
\r
173 <pathelement location="${distDir}/extensions/gdx-jnigen.jar"/>
\r
175 <ant antfile="../../build-template.xml" dir="extensions/gdx-bullet">
\r
176 <property name="distDir" value="${distDir}/extensions/gdx-bullet"/>
\r
177 <property name="jar" value="gdx-bullet"/>
\r
178 <reference refid="classpath"/>
\r
182 <!-- model loaders -->
\r
183 <target name="gdx-model-loaders" depends="gdx-core,gdx-backend-lwjgl">
\r
184 <path id="classpath">
\r
185 <pathelement location="${distDir}/gdx.jar"/>
\r
186 <pathelement location="${distDir}/extensions/gdx-jnigen.jar"/>
\r
187 <pathelement location="${distDir}/gdx-backend-lwjgl.jar"/>
\r
189 <ant antfile="../../../build-template.xml" dir="extensions/model-loaders/model-loaders">
\r
190 <property name="distDir" value="${distDir}/extensions/model-loaders/model-loaders"/>
\r
191 <property name="jar" value="gdx-model-loaders"/>
\r
192 <reference refid="classpath"/>
\r
197 <!-- generates the javadoc for the core api and the application implementations -->
\r
198 <target name="docs" depends="clean">
\r
199 <javadoc destdir="${distDir}/docs/api" author="true" version="true" use="true"
\r
200 windowtitle="libgdx API" doctitle="libgdx API" footer="libgdx API">
\r
204 body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
\r
205 pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
\r
206 h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%; font-weight:bold }
\r
207 .TableHeadingColor { background:#EEEEFF; }
\r
208 a { text-decoration:none }
\r
209 a:hover { text-decoration:underline }
\r
210 a:link, a:visited { color:blue }
\r
211 table { border:0px }
\r
212 .TableRowColor td:first-child { border-left:1px solid black }
\r
213 .TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
\r
214 hr { border:0px; border-bottom:1px solid #333366; }
\r
218 <div style="font-size:9pt"><i>
\r
219 Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
\r
222 <fileset dir="gdx/src" defaultexcludes="yes">
\r
223 <include name="com/badlogic/gdx/**" />
\r
224 <exclude name="com/badlogic/gdx/utils/arial-15.fnt" />
\r
225 <exclude name="com/badlogic/gdx/utils/arial-15.png" />
\r
226 <exclude name="com/badlogic/gdx/utils/XmlReader.rl" />
\r
227 <exclude name="com/badlogic/gdx/utils/JsonReader.rl" />
\r
229 <fileset dir="backends" includes="gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglApplication.java"/>
\r
230 <fileset dir="backends" includes="gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglCanvas.java"/>
\r
231 <fileset dir="backends" includes="gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglApplet.java"/>
\r
232 <fileset dir="backends" includes="gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidApplication.java"/>
\r
233 <fileset dir="backends" includes="gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidApplicationConfiguration.java"/>
\r
237 <target name="all"
\r
238 depends="clean,gdx-setup-ui,gdx-core,gdx-openal,gdx-backend-lwjgl,gdx-backend-android,gdx-backend-gwt,gdx-tools,gdx-tiled-preprocessor,gdx-image,gdx-audio,gdx-freetype,gdx-bullet,docs">
\r
239 <!-- copy distribution files (licences etc.) -->
\r
240 <copy tofile="${distDir}/README" file="gdx/dist/README"/>
\r
241 <copy tofile="${distDir}/LICENSE" file="gdx/dist/LICENSE"/>
\r
242 <copy tofile="${distDir}/CC-LICENSE" file="gdx/dist/CC-LICENSE"/>
\r
243 <copy tofile="${distDir}/AUTHORS" file="gdx/dist/AUTHORS"/>
\r
244 <copy tofile="${distDir}/CONTRIBUTORS" file="gdx/dist/CONTRIBUTORS"/>
\r
246 <!-- zip dist dir -->
\r
247 <zip destfile="libgdx-${version}.zip" basedir="${distDir}"/>
\r