From f2bc54893d91bac1ac828af02078c3497300563a Mon Sep 17 00:00:00 2001 From: renaud gaudin Date: Sat, 6 Jun 2015 19:23:04 +0200 Subject: [PATCH] build-android-with-native now overwrites local.properties to ensure use of proper (src/dependencies) SDK --- build-android-with-native.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build-android-with-native.py b/build-android-with-native.py index 2855bf07e..cae527025 100755 --- a/build-android-with-native.py +++ b/build-android-with-native.py @@ -11,7 +11,6 @@ import re import sys import copy import shutil -import tempfile from xml.dom.minidom import parse from subprocess import call, check_output @@ -571,6 +570,11 @@ if COMPILE_APK: os.chdir(curdir) + # rewrite local.properties to target proper SDK + with open('local.properties', 'w') as f: + f.write('# {}'.format(check_output('date').strip())) + f.write('sdk.dir={}'.format(os.path.abspath(SDK_PATH))) + # Compile java and build APK syscall('rm -f build/outputs/apk/*.apk', shell=True) syscall('./gradlew clean assemble')