Skip to content

Commit

Permalink
Bug 1231667 - Set Android SDK directory in topsrcdir Gradle configura…
Browse files Browse the repository at this point in the history
…tion. r=me f=mcomella
  • Loading branch information
ncalexan committed Dec 10, 2015
1 parent 8dfa15e commit 7bc2a5a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .hgignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 7bc2a5a

Please sign in to comment.