Bug 1344244 - Part 1: Accept newer Android lint version. r=glandium
authormozilla@mozilla-23773
Thu, 29 Jun 2017 11:43:22 -0700
changeset 369507 7c127a4f904a704de6ee521ec50749d4dd1ebb6c
parent 369506 1515fd3c7003a92d954b839e300f2a1a743dafc7
child 369508 01b0a01a38b1355ae9626308f1fb22be93b5acd9
push id32198
push userryanvm@gmail.com
push dateWed, 19 Jul 2017 13:22:22 +0000
treeherdermozilla-central@a1ea69a3a0a7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1344244
milestone56.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 1344244 - Part 1: Accept newer Android lint version. r=glandium MozReview-Commit-ID: KRwU0UKjkZZ
build/autoconf/android.m4
old-configure.in
--- a/build/autoconf/android.m4
+++ b/build/autoconf/android.m4
@@ -228,17 +228,17 @@ if test -n "$MOZ_INSTALL_TRACKING"; then
 fi
 
 ])
 
 dnl Configure an Android SDK.
 dnl Arg 1: compile SDK version, like 23.
 dnl Arg 2: target SDK version, like 23.
 dnl Arg 3: list of build-tools versions, like "23.0.3 23.0.1".
-dnl Arg 4: target lint version, like "25.3.1" (note: we fall back to
+dnl Arg 4: list of target lint versions, like "25.3.2 25.3.1" (note: we fall back to
 dnl        unversioned lint if this version is not found).
 AC_DEFUN([MOZ_ANDROID_SDK],
 [
 
 MOZ_ARG_WITH_STRING(android-sdk,
 [  --with-android-sdk=DIR
                           location where the Android SDK can be found (like ~/.mozbuild/android-sdk-linux)],
     android_sdk_root=$withval)
@@ -357,32 +357,38 @@ case "$target" in
     fi
     AC_MSG_RESULT([$ANDROID_SUPPORT_ANNOTATIONS_JAR])
     AC_SUBST(ANDROID_SUPPORT_ANNOTATIONS_JAR)
     ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB=$ANDROID_SUPPORT_ANNOTATIONS_JAR
     AC_SUBST(ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB)
     ;;
 esac
 
-android_lint_target=$4
+AC_MSG_CHECKING([for Android lint classpath])
 ANDROID_LINT_CLASSPATH=""
-android_lint_versioned_jar="$ANDROID_SDK_ROOT/tools/lib/lint-$android_lint_target.jar"
-android_lint_unversioned_jar="$ANDROID_SDK_ROOT/tools/lib/lint.jar"
-if test -e "$android_lint_versioned_jar" ; then
-    ANDROID_LINT_CLASSPATH="$ANDROID_LINT_CLASSPATH $android_lint_versioned_jar"
-    ANDROID_LINT_CLASSPATH="$ANDROID_LINT_CLASSPATH $ANDROID_SDK_ROOT/tools/lib/lint-checks-$android_lint_target.jar"
-    ANDROID_LINT_CLASSPATH="$ANDROID_LINT_CLASSPATH $ANDROID_SDK_ROOT/tools/lib/sdklib-$android_lint_target.jar"
-    ANDROID_LINT_CLASSPATH="$ANDROID_LINT_CLASSPATH $ANDROID_SDK_ROOT/tools/lib/repository-$android_lint_target.jar"
-    ANDROID_LINT_CLASSPATH="$ANDROID_LINT_CLASSPATH $ANDROID_SDK_ROOT/tools/lib/common-$android_lint_target.jar"
-    ANDROID_LINT_CLASSPATH="$ANDROID_LINT_CLASSPATH $ANDROID_SDK_ROOT/tools/lib/lint-api-$android_lint_target.jar"
-elif test -e "$android_lint_unversioned_jar" ; then
-    ANDROID_LINT_CLASSPATH="$ANDROID_LINT_CLASSPATH $android_lint_unversioned_jar"
-    ANDROID_LINT_CLASSPATH="$ANDROID_LINT_CLASSPATH $ANDROID_SDK_ROOT/tools/lib/lint-checks.jar"
-else
-    AC_MSG_ERROR([Unable to find android sdk's lint jar. This probably means that you need to update android.m4 to find the latest version of lint-*.jar and all its dependencies. (looked for $android_lint_versioned_jar and $android_lint_unversioned_jar)])
+for version in $4; do
+    android_lint_versioned_jar="$ANDROID_SDK_ROOT/tools/lib/lint-$version.jar"
+    if test -e "$android_lint_versioned_jar" ; then
+        ANDROID_LINT_CLASSPATH="$ANDROID_LINT_CLASSPATH $android_lint_versioned_jar"
+        ANDROID_LINT_CLASSPATH="$ANDROID_LINT_CLASSPATH $ANDROID_SDK_ROOT/tools/lib/lint-checks-$version.jar"
+        ANDROID_LINT_CLASSPATH="$ANDROID_LINT_CLASSPATH $ANDROID_SDK_ROOT/tools/lib/sdklib-$version.jar"
+        ANDROID_LINT_CLASSPATH="$ANDROID_LINT_CLASSPATH $ANDROID_SDK_ROOT/tools/lib/repository-$version.jar"
+        ANDROID_LINT_CLASSPATH="$ANDROID_LINT_CLASSPATH $ANDROID_SDK_ROOT/tools/lib/common-$version.jar"
+        ANDROID_LINT_CLASSPATH="$ANDROID_LINT_CLASSPATH $ANDROID_SDK_ROOT/tools/lib/lint-api-$version.jar"
+        break
+    fi
+done
+if test -z "$ANDROID_LINT_CLASSPATH" ; then
+    android_lint_unversioned_jar="$ANDROID_SDK_ROOT/tools/lib/lint.jar"
+    if test -e "$android_lint_unversioned_jar" ; then
+        ANDROID_LINT_CLASSPATH="$ANDROID_LINT_CLASSPATH $android_lint_unversioned_jar"
+        ANDROID_LINT_CLASSPATH="$ANDROID_LINT_CLASSPATH $ANDROID_SDK_ROOT/tools/lib/lint-checks.jar"
+    else
+        AC_MSG_ERROR([Unable to find android sdk's lint jar. This probably means that you need to update android.m4 to find the latest version of lint-*.jar and all its dependencies. (looked for $android_lint_versioned_jar and $android_lint_unversioned_jar)])
+    fi
 fi
 AC_MSG_RESULT([$ANDROID_LINT_CLASSPATH])
 AC_SUBST(ANDROID_LINT_CLASSPATH)
 
 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 ])
 
--- a/old-configure.in
+++ b/old-configure.in
@@ -2295,17 +2295,17 @@ AC_SUBST(MOZ_B2G_VERSION)
 dnl ========================================================
 dnl Ensure Android SDK and build-tools versions depending on
 dnl mobile target.
 dnl ========================================================
 
 if test -z "$gonkdir" ; then
     case "$MOZ_BUILD_APP" in
     mobile/android)
-        MOZ_ANDROID_SDK(23, 23, 23.0.3 23.0.1, 25.3.2)
+        MOZ_ANDROID_SDK(23, 23, 23.0.3 23.0.1, 25.3.2 25.3.1)
         ;;
     esac
 fi
 
 dnl ========================================================
 dnl =
 dnl = Toolkit Options
 dnl =