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

--HG--
extra : commitid : JaIcJaQkY0L
extra : rebase_source : 874d2ee3c68058b5c96997437a78155ec789c6c5
extra : histedit_source : 7a1c2bc56259d10ccd6b02451016c83c52135351
This commit is contained in:
Nick Alexander 2015-12-10 10:51:42 -05:00
Родитель 297357597f
Коммит 63de561f49
2 изменённых файлов: 11 добавлений и 1 удалений

Просмотреть файл

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

Просмотреть файл

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