Bug 1498406 - Part 2: Don't check for Android platform in configure. r=froydnj
authorNick Alexander <nalexander@mozilla.com>
Tue, 18 Dec 2018 03:29:16 +0000
changeset 451086 cc64661d5c947ca7beedd0789e4cc51180318734
parent 451085 df01499f9fdf1f10f77e25861736d71eec51f693
child 451087 b0002d2ea03f3a91a8fb3319b9eb03367919e398
push id110599
push usercbrindusan@mozilla.com
push dateTue, 18 Dec 2018 09:54:40 +0000
treeherdermozilla-inbound@3b3152b56190 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1498406
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1498406 - Part 2: Don't check for Android platform in configure. r=froydnj There's no need -- it will be fetched by Gradle when needed. The only wrinkle is that the user might be asked to confirm license agreements, which could be a hassle (and could cause problems in CI, but there we install relevant platforms in advance). Differential Revision: https://phabricator.services.mozilla.com/D14288
build.gradle
build/autoconf/android.m4
--- a/build.gradle
+++ b/build.gradle
@@ -10,17 +10,17 @@ def tryInt = { string ->
 
 allprojects {
     // Expose the per-object-directory configuration to all projects.
     ext {
         mozconfig = gradle.mozconfig
         topsrcdir = gradle.mozconfig.topsrcdir
         topobjdir = gradle.mozconfig.topobjdir
 
-        compileSdkVersion = tryInt(mozconfig.substs.ANDROID_COMPILE_SDK_VERSION)
+        compileSdkVersion = 26
         targetSdkVersion = tryInt(mozconfig.substs.ANDROID_TARGET_SDK)
         minSdkVersion = tryInt(mozconfig.substs.MOZ_ANDROID_MIN_SDK_VERSION)
         manifestPlaceholders = [
             ANDROID_PACKAGE_NAME: mozconfig.substs.ANDROID_PACKAGE_NAME,
             ANDROID_TARGET_SDK: mozconfig.substs.ANDROID_TARGET_SDK,
             MOZ_ANDROID_MIN_SDK_VERSION: mozconfig.substs.MOZ_ANDROID_MIN_SDK_VERSION,
             MOZ_ANDROID_SHARED_ID: "${mozconfig.substs.ANDROID_PACKAGE_NAME}.sharedID",
         ]
--- a/build/autoconf/android.m4
+++ b/build/autoconf/android.m4
@@ -112,28 +112,17 @@ case "$target" in
 
     # We were given an old-style
     # --with-android-sdk=/path/to/sdk/platforms/android-*.  We could warn, but
     # we'll get compliance by forcing the issue.
     if test -e "$withval"/source.properties ; then
         AC_MSG_ERROR([Including platforms/android-* in --with-android-sdk arguments is deprecated.  Use --with-android-sdk=$android_sdk_root.])
     fi
 
-    android_compile_sdk=$1
-    AC_MSG_CHECKING([for Android SDK platform version $android_compile_sdk])
-    android_sdk=$android_sdk_root/platforms/android-$android_compile_sdk
-    if ! test -e "$android_sdk/source.properties" ; then
-        AC_MSG_ERROR([You must download Android SDK platform version $android_compile_sdk.  Try |mach bootstrap|.  (Looked for $android_sdk)])
-    fi
-    AC_MSG_RESULT([$android_sdk])
-
     android_target_sdk=$2
-    if test $android_compile_sdk -lt $android_target_sdk ; then
-        AC_MSG_ERROR([Android compileSdkVersion ($android_compile_sdk) should not be smaller than targetSdkVersion ($android_target_sdk).])
-    fi
 
     AC_MSG_CHECKING([for Android build-tools])
     android_build_tools_base="$android_sdk_root"/build-tools
     android_build_tools_version=""
     for version in $3; do
         android_build_tools="$android_build_tools_base"/$version
         if test -d "$android_build_tools" -a -f "$android_build_tools/aapt"; then
             android_build_tools_version=$version
@@ -175,26 +164,22 @@ case "$target" in
     dnl Android Tools 26 changes emulator path.
     dnl Although android_sdk_root/tools still has emulator command,
     dnl it doesn't work correctly
     MOZ_PATH_PROG(EMULATOR, emulator, :, [$android_sdk_root/emulator:$android_tools])
     if test -z "$EMULATOR" -o "$EMULATOR" = ":"; then
         AC_MSG_ERROR([The program emulator was not found.  Try |mach bootstrap|.])
     fi
 
-    ANDROID_COMPILE_SDK_VERSION="${android_compile_sdk}"
     ANDROID_TARGET_SDK="${android_target_sdk}"
-    ANDROID_SDK="${android_sdk}"
     ANDROID_SDK_ROOT="${android_sdk_root}"
     ANDROID_TOOLS="${android_tools}"
     ANDROID_BUILD_TOOLS_VERSION="$android_build_tools_version"
-    AC_SUBST(ANDROID_COMPILE_SDK_VERSION)
     AC_SUBST(ANDROID_TARGET_SDK)
     AC_SUBST(ANDROID_SDK_ROOT)
-    AC_SUBST(ANDROID_SDK)
     AC_SUBST(ANDROID_TOOLS)
     AC_SUBST(ANDROID_BUILD_TOOLS_VERSION)
     ;;
 esac
 
 MOZ_ARG_WITH_STRING(android-min-sdk,
 [  --with-android-min-sdk=[VER]     Impose a minimum Firefox for Android SDK version],
 [ MOZ_ANDROID_MIN_SDK_VERSION=$withval ])