diff --git a/.hgignore b/.hgignore index 94e391ff12337..31f1b149453d8 100644 --- a/.hgignore +++ b/.hgignore @@ -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 diff --git a/settings.gradle b/settings.gradle index f13360b226404..8e48f79ac6300 100644 --- a/settings.gradle +++ b/settings.gradle @@ -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'