Skip to content

Commit

Permalink
Fix Bug 624 - Compile and generate android JAR files (gluegen-rt-andr…
Browse files Browse the repository at this point in the history
…oid.jar) if android SDK JAR files are available.
  • Loading branch information
sgothel committed Oct 4, 2012
1 parent 5ac7a61 commit 55b4552
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
13 changes: 8 additions & 5 deletions make/build.xml
Expand Up @@ -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}"/>
Expand Down Expand Up @@ -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>

Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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">
Expand All @@ -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}"
Expand Down Expand Up @@ -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}"
Expand Down Expand Up @@ -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" />
Expand Down
18 changes: 17 additions & 1 deletion make/gluegen-properties.xml
Expand Up @@ -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"/>
Expand Down

0 comments on commit 55b4552

Please sign in to comment.