Bug 1231667 - Set Android SDK directory in topsrcdir Gradle configuration. r=me f=mcomella

This commit is contained in:
Nick Alexander 2015-12-10 10:51:42 -05:00
parent 08ce009f06
commit 3d8d7fa0f6
2 changed files with 11 additions and 1 deletions

View File

@ -59,6 +59,9 @@ _OPT\.OBJ/
# Gradle cache.
^.gradle/
# Local Gradle configuration properties.
^local.properties$
# Python stuff installed at build time.
^python/psutil/.*\.so
^python/psutil/.*\.pyd

View File

@ -18,9 +18,16 @@ def slurper = new JsonSlurper()
def json = slurper.parseText(standardOutput.toString())
if (json.substs.MOZ_BUILD_APP != 'mobile/android') {
throw new GradleException("Building with Gradle is only supported for Fennec, i.e., MOZ_BUILD_APP == 'mobile/android'.");
throw new GradleException("Building with Gradle is only supported for Fennec, i.e., MOZ_BUILD_APP == 'mobile/android'.")
}
// Set the Android SDK location. This is the *least specific* mechanism, which
// is unfortunate: we'd prefer to use the *most specific* mechanism. That is,
// local.properties (first 'sdk.dir', then 'android.dir') and then the
// environment variable ANDROID_HOME will override this. That's unfortunate,
// but it's hard to automatically arrange better.
System.setProperty('android.home', json.substs.ANDROID_SDK_ROOT)
include ':app'
include ':base'
include ':omnijar'