Updated Android build scripts.

This commit is contained in:
Jean-Philip Desjardins 2015-07-21 01:19:52 -04:00
parent a963b633c4
commit 7d190bb39a
5 changed files with 40 additions and 28 deletions

View File

@ -0,0 +1,3 @@
@echo off
CALL %ANDROID_SDK_ROOT%/tools/android.bat update project -p .
%ANT_HOME%/bin/ant debug -Dndk.debug=1

View File

@ -0,0 +1,3 @@
@echo off
CALL %ANDROID_SDK_ROOT%/tools/android.bat update project -p .
%ANT_HOME%/bin/ant debug -Dndk.debug=0

3
build_android/clean.cmd Normal file
View File

@ -0,0 +1,3 @@
@echo off
CALL %ANDROID_SDK_ROOT%/tools/android.bat update project -p .
%ANT_HOME%/bin/ant clean

View File

@ -1,6 +1,4 @@
#!/bin/bash
set -e
$ANDROID_SDK_ROOT/tools/android.bat update project -p .
$ANT_HOME/bin/ant clean -Dndk.debug=0
$ANT_HOME/bin/ant clean -Dndk.debug=1
$ANT_HOME/bin/ant clean

View File

@ -1,33 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="play-native" default="help">
<property environment="env" />
<property environment="env" />
<condition property="ndk.debug" value="${env.NDK_DEBUG}" else="1">
<isset property="env.NDK_DEBUG" />
</condition>
<condition property="ndkbuildopt" value="-j${env.NUMBER_OF_PROCESSORS}" else="-j4">
<isset property="env.NUMBER_OF_PROCESSORS" />
</condition>
<condition property="ndkbuildopt" value="${env.NDKBUILDOPT}">
<isset property="env.NDKBUILDOPT" />
</condition>
<target name="-pre-build">
<exec executable="${ndk.dir}/ndk-build.cmd" failonerror="true" osfamily="windows">
<condition property="ndkcpu" value="-j${env.NUMBER_OF_PROCESSORS}" else="-j4">
<isset property="env.NUMBER_OF_PROCESSORS" />
</condition>
<target name="-pre-build">
<exec executable="${ndk.dir}/ndk-build.cmd" failonerror="true" osfamily="windows">
<env key="NDK_DEBUG" value="${ndk.debug}"/>
<arg line="${ndkbuildopt}"/>
</exec>
<exec executable="${ndk.dir}/ndk-build" failonerror="true" osfamily="unix">
<arg value="${ndkcpu}" />
</exec>
<exec executable="${ndk.dir}/ndk-build" failonerror="true" osfamily="unix">
<env key="NDK_DEBUG" value="${ndk.debug}"/>
<arg line="${ndkbuildopt}"/>
</exec>
</target>
<target name="clean" depends="android_rules.clean">
<exec executable="${ndk.dir}/ndk-build.cmd" failonerror="true" osfamily="windows">
<env key="NDK_DEBUG" value="${ndk.debug}"/>
<arg value="clean"/>
</exec>
<exec executable="${ndk.dir}/ndk-build" failonerror="true" osfamily="unix">
<env key="NDK_DEBUG" value="${ndk.debug}"/>
<arg value="clean"/>
</exec>
</target>
<arg value="${ndkcpu}" />
</exec>
</target>
<target name="-pre-clean">
<exec executable="${ndk.dir}/ndk-build.cmd" failonerror="true" osfamily="windows">
<arg value="clean" />
</exec>
<exec executable="${ndk.dir}/ndk-build.cmd" failonerror="true" osfamily="windows">
<arg value="clean" />
<arg value="NDK_DEBUG=1" />
</exec>
<exec executable="${ndk.dir}/ndk-build" failonerror="true" osfamily="unix">
<arg value="clean" />
</exec>
<exec executable="${ndk.dir}/ndk-build" failonerror="true" osfamily="unix">
<arg value="clean" />
<arg value="NDK_DEBUG=1" />
</exec>
</target>
</project>