build-android-with-native now overwrites local.properties to ensure use of proper (src/dependencies) SDK

This commit is contained in:
renaud gaudin 2015-06-06 19:23:04 +02:00
parent a8a9a4a0ac
commit f2bc54893d

View File

@ -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')