diff options
author | Sven Gothel <[email protected]> | 2012-10-04 03:23:30 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-10-04 03:23:30 +0200 |
commit | 55b4552aef7882c358d545d020d6f12c958ed8ed (patch) | |
tree | 2401f06143979f94dce9231f9db8ae45145fc7d6 | |
parent | 5ac7a618808ca7964c74789e28f0a1e9b6e9c14e (diff) |
Fix Bug 624 - Compile and generate android JAR files (gluegen-rt-android.jar) if android SDK JAR files are available.
-rw-r--r-- | make/build.xml | 13 | ||||
-rwxr-xr-x | make/gluegen-properties.xml | 18 |
2 files changed, 25 insertions, 6 deletions
diff --git a/make/build.xml b/make/build.xml index ac31e2d..8d9a6ff 100644 --- a/make/build.xml +++ b/make/build.xml @@ -34,7 +34,7 @@ </path> </target> - <target name="init.android" if="isAndroid" > + <target name="init.android" if="android-jars.available" > <!-- Create the classpath for compiling Android only stuff. --> <path id="android.classpath"> <pathelement location="${android-min.jar}"/> @@ -369,7 +369,7 @@ <property name="java.includes.dir.platform" value="${java.includes.dir}/linux" /> </target> - <target name="declare.android" if="isAndroid" > + <target name="declare.android" if="android-jars.available" > <property name="c.src.dir.os" value="unix" /> </target> @@ -759,7 +759,7 @@ </copy> </target> - <target name="gluegen.build.android" if="isAndroid"> + <target name="gluegen.build.android" if="android-jars.available"> <!--compile gluegen-rt-android first--> <javac destdir="${classes}" includeAntRuntime="false" @@ -793,6 +793,7 @@ <include name="com/jogamp/gluegen/runtime/*.class" /> <include name="com/jogamp/common/**" /> <include name="jogamp/common/**" /> + <include name="${java.part.android}" /> <exclude name="${jogamp-android-launcher.classes}" /> </fileset> <fileset dir="resources/assets"> @@ -816,7 +817,7 @@ </uptodate> </target> - <target name="android-launcher.build" depends="gluegen.cpptasks.detect.os,gluegen.build.check.android-launcher" if="isAndroid" unless="gluegen.build.skip.android-launcher"> + <target name="android-launcher.build" depends="gluegen.cpptasks.detect.os,gluegen.build.check.android-launcher" if="android-jars.available" unless="gluegen.build.skip.android-launcher"> <javac destdir="${classes}" includeAntRuntime="false" includes="${jogamp-android-launcher.classes}" @@ -847,7 +848,9 @@ <include name="${jogamp-android-launcher.classes}" /> </fileset> </jar> + </target> + <target name="android-launcher.package" depends="android-launcher.build" if="isAndroid" unless="gluegen.build.skip.android-launcher"> <aapt.signed assetsdir="resources/assets-launcher" jarbuilddir="${build}" @@ -889,7 +892,7 @@ </target> <target name="base.compile" description="Base compile ensuring valid build results w/o tampering the artifacts.properties" - depends="init, android-launcher.build, gluegen.build.java, gluegen.build.c" /> + depends="init, android-launcher.package, gluegen.build.java, gluegen.build.c" /> <target name="all.no_junit" description="Release build" depends="init, base.compile, tag.build, android.package, developer-zip-archive" /> <target name="all" description="Release build" depends="init, base.compile, tag.build, junit.compile, android.package, developer-zip-archive" /> diff --git a/make/gluegen-properties.xml b/make/gluegen-properties.xml index 60721eb..7aab7c5 100755 --- a/make/gluegen-properties.xml +++ b/make/gluegen-properties.xml @@ -54,7 +54,23 @@ <property name="android.version" value="9" /> <!-- default - if not set by jogamp-env.xml:jogamp.env.init --> <property name="android-min.jar" value="${gluegen.root}/make/lib/android-sdk/${android.version}/android.jar" /> <property name="android-015.jar" value="${gluegen.root}/make/lib/android-sdk/15/android.jar" /> - <property name="android.jar" value="${android-015.jar}" /> + <property name="android.jar" value="${android-015.jar}" /> + <condition property="android-jars.available"> + <and> + <available file="${android-min.jar}"/> + <available file="${android.jar}"/> + </and> + </condition> + <fail message="isAndroid set, but android jar files n/a: ${android-min.jar}, ${android.jar}"> + <condition> + <and> + <isset property="isAndroid"/> + <not> + <isset property="android-jars.available"/> + </not> + </and> + </condition> + </fail> <property name="android.keystore.file" value="/non.existing.user.keystore.file"/> <!-- default - maybe overriden by the gluegen.user.properties.file --> <property name="android.keystore.alias" value="debug"/> |