Bug 1380639 - Add contraint-layout and constraint-layer-solver dependencies. r=mcomella
authorSebastian Kaspari <s.kaspari@gmail.com>
Tue, 25 Jul 2017 10:12:38 +0200
changeset 422355 514cf1f55c6fa80deb7490d80a59313577d625cc
parent 422354 ebb30b6d61849bcbd85d505c1e367528c6fb00f6
child 422356 4ecb1be113cb437ebf56e872faf0913f81352b0b
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcomella
bugs1380639
milestone57.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 1380639 - Add contraint-layout and constraint-layer-solver dependencies. r=mcomella MozReview-Commit-ID: AbZLlwdDHRV
build/autoconf/android.m4
mobile/android/app/build.gradle
mobile/android/base/Makefile.in
mobile/android/base/moz.build
python/mozboot/mozboot/android-packages.txt
--- a/build/autoconf/android.m4
+++ b/build/autoconf/android.m4
@@ -164,24 +164,24 @@ AC_DEFUN([MOZ_ANDROID_AAR_COMPONENT], [
     AC_SUBST($1)
   ])
 ])
 
 dnl Find an AAR and expose variables representing its exploded components.
 dnl AC_SUBSTs ANDROID_NAME_{AAR,AAR_RES,AAR_LIB,AAR_INTERNAL_LIB}.
 dnl Arg 1: name, like play-services-base
 dnl Arg 2: version, like 7.8.0
-dnl Arg 3: extras subdirectory, either android or google
+dnl Arg 3: extras subdirectory, like extras, extras/android, or extras/google.
 dnl Arg 4: package subdirectory, like com/google/android/gms
 dnl Arg 5: if non-empty, expect and require internal_impl JAR.
 dnl Arg 6: if non-empty, expect and require assets/ directory.
 AC_DEFUN([MOZ_ANDROID_AAR],[
   define([local_aar_var_base], translit($1, [-a-z], [_A-Z]))
   define([local_aar_var], concat(ANDROID_, local_aar_var_base, _AAR))
-  local_aar_var="$ANDROID_SDK_ROOT/extras/$3/m2repository/$4/$1/$2/$1-$2.aar"
+  local_aar_var="$ANDROID_SDK_ROOT/$3/m2repository/$4/$1/$2/$1-$2.aar"
   AC_MSG_CHECKING([for $1 AAR])
   if ! test -e "$local_aar_var" ; then
     AC_MSG_ERROR([You must download the $1 AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $local_aar_var)])
   fi
   AC_SUBST(local_aar_var)
   AC_MSG_RESULT([$local_aar_var])
 
   if ! $PYTHON -m mozbuild.action.explode_aar --destdir=$MOZ_BUILD_ROOT/dist/exploded-aar $local_aar_var ; then
@@ -194,42 +194,42 @@ AC_DEFUN([MOZ_ANDROID_AAR],[
   MOZ_ANDROID_AAR_COMPONENT(concat(local_aar_var, _INTERNAL_LIB), concat(root, libs/$1-$2-internal_impl-$2.jar), $5)
   MOZ_ANDROID_AAR_COMPONENT(concat(local_aar_var, _ASSETS), concat(root, assets), $6)
 ])
 
 AC_DEFUN([MOZ_ANDROID_GOOGLE_PLAY_SERVICES],
 [
 
 if test -n "$MOZ_NATIVE_DEVICES" ; then
-    MOZ_ANDROID_AAR(play-services-base, $ANDROID_GOOGLE_PLAY_SERVICES_VERSION, google, com/google/android/gms)
-    MOZ_ANDROID_AAR(play-services-basement, $ANDROID_GOOGLE_PLAY_SERVICES_VERSION, google, com/google/android/gms)
-    MOZ_ANDROID_AAR(play-services-cast, $ANDROID_GOOGLE_PLAY_SERVICES_VERSION, google, com/google/android/gms)
-    MOZ_ANDROID_AAR(mediarouter-v7, $ANDROID_SUPPORT_LIBRARY_VERSION, android, com/android/support, REQUIRED_INTERNAL_IMPL)
+    MOZ_ANDROID_AAR(play-services-base, $ANDROID_GOOGLE_PLAY_SERVICES_VERSION, extras/google, com/google/android/gms)
+    MOZ_ANDROID_AAR(play-services-basement, $ANDROID_GOOGLE_PLAY_SERVICES_VERSION, extras/google, com/google/android/gms)
+    MOZ_ANDROID_AAR(play-services-cast, $ANDROID_GOOGLE_PLAY_SERVICES_VERSION, extras/google, com/google/android/gms)
+    MOZ_ANDROID_AAR(mediarouter-v7, $ANDROID_SUPPORT_LIBRARY_VERSION, extras/android, com/android/support, REQUIRED_INTERNAL_IMPL)
 fi
 
 ])
 
 AC_DEFUN([MOZ_ANDROID_GOOGLE_CLOUD_MESSAGING],
 [
 
 if test -n "$MOZ_ANDROID_GCM" ; then
-    MOZ_ANDROID_AAR(play-services-base, $ANDROID_GOOGLE_PLAY_SERVICES_VERSION, google, com/google/android/gms)
-    MOZ_ANDROID_AAR(play-services-basement, $ANDROID_GOOGLE_PLAY_SERVICES_VERSION, google, com/google/android/gms)
-    MOZ_ANDROID_AAR(play-services-gcm, $ANDROID_GOOGLE_PLAY_SERVICES_VERSION, google, com/google/android/gms)
-    MOZ_ANDROID_AAR(play-services-measurement, $ANDROID_GOOGLE_PLAY_SERVICES_VERSION, google, com/google/android/gms)
+    MOZ_ANDROID_AAR(play-services-base, $ANDROID_GOOGLE_PLAY_SERVICES_VERSION, extras/google, com/google/android/gms)
+    MOZ_ANDROID_AAR(play-services-basement, $ANDROID_GOOGLE_PLAY_SERVICES_VERSION, extras/google, com/google/android/gms)
+    MOZ_ANDROID_AAR(play-services-gcm, $ANDROID_GOOGLE_PLAY_SERVICES_VERSION, extras/google, com/google/android/gms)
+    MOZ_ANDROID_AAR(play-services-measurement, $ANDROID_GOOGLE_PLAY_SERVICES_VERSION, extras/google, com/google/android/gms)
 fi
 
 ])
 
 AC_DEFUN([MOZ_ANDROID_INSTALL_TRACKING],
 [
 
 if test -n "$MOZ_INSTALL_TRACKING"; then
-    MOZ_ANDROID_AAR(play-services-ads, $ANDROID_GOOGLE_PLAY_SERVICES_VERSION, google, com/google/android/gms)
-    MOZ_ANDROID_AAR(play-services-basement, $ANDROID_GOOGLE_PLAY_SERVICES_VERSION, google, com/google/android/gms)
+    MOZ_ANDROID_AAR(play-services-ads, $ANDROID_GOOGLE_PLAY_SERVICES_VERSION, extras/google, com/google/android/gms)
+    MOZ_ANDROID_AAR(play-services-basement, $ANDROID_GOOGLE_PLAY_SERVICES_VERSION, extras/google, com/google/android/gms)
 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".
@@ -335,35 +335,42 @@ case "$target" in
     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)
 
-    MOZ_ANDROID_AAR(customtabs, $ANDROID_SUPPORT_LIBRARY_VERSION, android, com/android/support)
-    MOZ_ANDROID_AAR(appcompat-v7, $ANDROID_SUPPORT_LIBRARY_VERSION, android, com/android/support)
-    MOZ_ANDROID_AAR(support-vector-drawable, $ANDROID_SUPPORT_LIBRARY_VERSION, android, com/android/support)
-    MOZ_ANDROID_AAR(animated-vector-drawable, $ANDROID_SUPPORT_LIBRARY_VERSION, android, com/android/support)
-    MOZ_ANDROID_AAR(cardview-v7, $ANDROID_SUPPORT_LIBRARY_VERSION, android, com/android/support)
-    MOZ_ANDROID_AAR(design, $ANDROID_SUPPORT_LIBRARY_VERSION, android, com/android/support)
-    MOZ_ANDROID_AAR(recyclerview-v7, $ANDROID_SUPPORT_LIBRARY_VERSION, android, com/android/support)
-    MOZ_ANDROID_AAR(support-v4, $ANDROID_SUPPORT_LIBRARY_VERSION, android, com/android/support, REQUIRED_INTERNAL_IMPL)
-    MOZ_ANDROID_AAR(palette-v7, $ANDROID_SUPPORT_LIBRARY_VERSION, android, com/android/support)
+    MOZ_ANDROID_AAR(customtabs, $ANDROID_SUPPORT_LIBRARY_VERSION, extras/android, com/android/support)
+    MOZ_ANDROID_AAR(appcompat-v7, $ANDROID_SUPPORT_LIBRARY_VERSION, extras/android, com/android/support)
+    MOZ_ANDROID_AAR(support-vector-drawable, $ANDROID_SUPPORT_LIBRARY_VERSION, extras/android, com/android/support)
+    MOZ_ANDROID_AAR(animated-vector-drawable, $ANDROID_SUPPORT_LIBRARY_VERSION, extras/android, com/android/support)
+    MOZ_ANDROID_AAR(cardview-v7, $ANDROID_SUPPORT_LIBRARY_VERSION, extras/android, com/android/support)
+    MOZ_ANDROID_AAR(design, $ANDROID_SUPPORT_LIBRARY_VERSION, extras/android, com/android/support)
+    MOZ_ANDROID_AAR(recyclerview-v7, $ANDROID_SUPPORT_LIBRARY_VERSION, extras/android, com/android/support)
+    MOZ_ANDROID_AAR(support-v4, $ANDROID_SUPPORT_LIBRARY_VERSION, extras/android, com/android/support, REQUIRED_INTERNAL_IMPL)
+    MOZ_ANDROID_AAR(palette-v7, $ANDROID_SUPPORT_LIBRARY_VERSION, extras/android, com/android/support)
+    MOZ_ANDROID_AAR(constraint-layout, 1.0.2, extras, com/android/support/constraint)
 
-    ANDROID_SUPPORT_ANNOTATIONS_JAR="$ANDROID_SDK_ROOT/extras/android/m2repository/com/android/support/support-annotations/$ANDROID_SUPPORT_LIBRARY_VERSION/support-annotations-$ANDROID_SUPPORT_LIBRARY_VERSION.jar"
+    ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB="$ANDROID_SDK_ROOT/extras/android/m2repository/com/android/support/support-annotations/$ANDROID_SUPPORT_LIBRARY_VERSION/support-annotations-$ANDROID_SUPPORT_LIBRARY_VERSION.jar"
     AC_MSG_CHECKING([for support-annotations JAR])
-    if ! test -e $ANDROID_SUPPORT_ANNOTATIONS_JAR ; then
-        AC_MSG_ERROR([You must download the support-annotations lib.  Run the Android SDK tool and install the Android Support Repository under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (looked for $ANDROID_SUPPORT_ANNOTATIONS_JAR)])
+    if ! test -e $ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB ; then
+        AC_MSG_ERROR([You must download the support-annotations lib.  Run the Android SDK tool and install the Android Support Repository under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (looked for $ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB)])
     fi
-    AC_MSG_RESULT([$ANDROID_SUPPORT_ANNOTATIONS_JAR])
-    AC_SUBST(ANDROID_SUPPORT_ANNOTATIONS_JAR)
-    ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB=$ANDROID_SUPPORT_ANNOTATIONS_JAR
+    AC_MSG_RESULT([$ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB])
     AC_SUBST(ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB)
+
+    ANDROID_CONSTRAINT_LAYOUT_SOLVER_JAR_LIB="$ANDROID_SDK_ROOT/extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.2/constraint-layout-solver-1.0.2.jar"
+    AC_MSG_CHECKING([for constraint-layout-solver JAR])
+    if ! test -e $ANDROID_CONSTRAINT_LAYOUT_SOLVER_JAR_LIB ; then
+        AC_MSG_ERROR([You must download the constraint-layout-solver lib.  Run the Android SDK tool and install the Android Support Repository under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (looked for $ANDROID_CONSTRAINT_LAYOUT_SOLVER_JAR_LIB)])
+    fi
+    AC_MSG_RESULT([$ANDROID_CONSTRAINT_LAYOUT_SOLVER_JAR_LIB])
+    AC_SUBST(ANDROID_CONSTRAINT_LAYOUT_SOLVER_JAR_LIB)
     ;;
 esac
 
 AC_MSG_CHECKING([for Android lint classpath])
 ANDROID_LINT_CLASSPATH=""
 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
--- a/mobile/android/app/build.gradle
+++ b/mobile/android/app/build.gradle
@@ -229,16 +229,17 @@ android {
 dependencies {
     compile "com.android.support:support-v4:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
     compile "com.android.support:appcompat-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
     compile "com.android.support:cardview-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
     compile "com.android.support:recyclerview-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
     compile "com.android.support:design:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
     compile "com.android.support:customtabs:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
     compile "com.android.support:palette-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
+    compile 'com.android.support.constraint:constraint-layout:1.0.2'
 
     if (mozconfig.substs.MOZ_NATIVE_DEVICES) {
         compile "com.android.support:mediarouter-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
         compile "com.google.android.gms:play-services-basement:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}"
         compile "com.google.android.gms:play-services-base:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}"
         compile "com.google.android.gms:play-services-cast:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}"
     }
 
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -43,16 +43,18 @@ JAVA_CLASSPATH += \
     $(ANDROID_APPCOMPAT_V7_AAR_LIB) \
     $(ANDROID_SUPPORT_VECTOR_DRAWABLE_AAR_LIB) \
     $(ANDROID_ANIMATED_VECTOR_DRAWABLE_AAR_LIB) \
     $(ANDROID_CARDVIEW_V7_AAR_LIB) \
     $(ANDROID_DESIGN_AAR_LIB) \
     $(ANDROID_RECYCLERVIEW_V7_AAR_LIB) \
     $(ANDROID_CUSTOMTABS_AAR_LIB) \
     $(ANDROID_PALETTE_V7_AAR_LIB) \
+    $(ANDROID_CONSTRAINT_LAYOUT_AAR_LIB) \
+    $(ANDROID_CONSTRAINT_LAYOUT_SOLVER_JAR_LIB) \
     $(NULL)
 
 # If native devices are enabled, add Google Play Services and some of the v7
 # compat libraries.
 ifdef MOZ_NATIVE_DEVICES
     JAVA_CLASSPATH += \
         $(ANDROID_PLAY_SERVICES_BASE_AAR_LIB) \
         $(ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB) \
@@ -98,16 +100,18 @@ java_bundled_libs := \
     $(ANDROID_APPCOMPAT_V7_AAR_LIB) \
     $(ANDROID_SUPPORT_VECTOR_DRAWABLE_AAR_LIB) \
     $(ANDROID_ANIMATED_VECTOR_DRAWABLE_AAR_LIB) \
     $(ANDROID_CARDVIEW_V7_AAR_LIB) \
     $(ANDROID_DESIGN_AAR_LIB) \
     $(ANDROID_RECYCLERVIEW_V7_AAR_LIB) \
     $(ANDROID_CUSTOMTABS_AAR_LIB) \
     $(ANDROID_PALETTE_V7_AAR_LIB) \
+    $(ANDROID_CONSTRAINT_LAYOUT_AAR_LIB) \
+    $(ANDROID_CONSTRAINT_LAYOUT_SOLVER_JAR_LIB) \
     $(NULL)
 
 ifdef MOZ_NATIVE_DEVICES
     java_bundled_libs += \
         $(ANDROID_PLAY_SERVICES_BASE_AAR_LIB) \
         $(ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB) \
         $(ANDROID_PLAY_SERVICES_CAST_AAR_LIB) \
         $(ANDROID_MEDIAROUTER_V7_AAR_LIB) \
@@ -404,16 +408,17 @@ generated/org/mozilla/gecko/R.java: .aap
 # (no resources) generated/android/support/v4/R.java: .aapt.deps ;
 generated/android/support/v7/appcompat/R.java: .aapt.deps ;
 # (no resources) generated/android/support/graphics/drawable/animated/R.java: .aapt.deps ;
 # (no resources) generated/android/support/graphics/drawable/R.java: .aapt.deps ;
 generated/android/support/v7/cardview/R.java: .aapt.deps ;
 generated/android/support/design/R.java: .aapt.deps ;
 generated/android/support/v7/mediarouter/R.java: .aapt.deps ;
 generated/android/support/v7/recyclerview/R.java: .aapt.deps ;
+generated/android/support/constraint/R.java: .aapt.deps ;
 # (no resources) generated/android/support/customtabs/R.java: .aapt.deps ;
 # (no resources) generated/android/support/v7/palette/R.java: .aapt.deps ;
 generated/com/google/android/gms/R.java: .aapt.deps ;
 generated/com/google/android/gms/ads/R.java: .aapt.deps ;
 generated/com/google/android/gms/base/R.java: .aapt.deps ;
 generated/com/google/android/gms/cast/R.java: .aapt.deps ;
 # (no resources) generated/com/google/android/gms/gcm/R.java: .aapt.deps ;
 # (no resources) generated/com/google/android/gms/measurement/R.java: .aapt.deps ;
--- a/mobile/android/base/moz.build
+++ b/mobile/android/base/moz.build
@@ -234,16 +234,20 @@ if CONFIG['ANDROID_RECYCLERVIEW_V7_AAR']
 if CONFIG['ANDROID_CUSTOMTABS_AAR']:
     ANDROID_EXTRA_PACKAGES += ['android.support.customtabs']
     ANDROID_EXTRA_RES_DIRS += ['%' + CONFIG['ANDROID_CUSTOMTABS_AAR_RES']]
 # (no resources) resjar.generated_sources += ['generated/android/support/customtabs/R.java']
 if CONFIG['ANDROID_PALETTE_V7_AAR']:
     ANDROID_EXTRA_PACKAGES += ['android.support.v7.palette']
     ANDROID_EXTRA_RES_DIRS += ['%' + CONFIG['ANDROID_PALETTE_V7_AAR_RES']]
 # (no resources) resjar.generated_sources += ['generated/android/support/v7/palette/R.java']
+if CONFIG['ANDROID_CONSTRAINT_LAYOUT_AAR']:
+    ANDROID_EXTRA_PACKAGES += ['android.support.constraint']
+    ANDROID_EXTRA_RES_DIRS += ['%' + CONFIG['ANDROID_CONSTRAINT_LAYOUT_AAR_RES']]
+    resjar.generated_sources += ['generated/android/support/constraint/R.java']
 
 resjar.javac_flags += ['-Xlint:all']
 
 mgjar = add_java_jar('gecko-mozglue')
 mgjar.sources += [geckoview_source_dir + 'java/org/mozilla/gecko/' + x for x in [
     'mozglue/ByteBufferInputStream.java',
     'mozglue/DirectBufferAllocator.java',
     'mozglue/GeckoLoader.java',
@@ -1164,16 +1168,18 @@ if CONFIG['MOZ_INSTALL_TRACKING']:
 gbjar.extra_jars += [CONFIG['ANDROID_APPCOMPAT_V7_AAR_LIB']]
 gbjar.extra_jars += [CONFIG['ANDROID_SUPPORT_VECTOR_DRAWABLE_AAR_LIB']]
 gbjar.extra_jars += [CONFIG['ANDROID_ANIMATED_VECTOR_DRAWABLE_AAR_LIB']]
 gbjar.extra_jars += [CONFIG['ANDROID_CARDVIEW_V7_AAR_LIB']]
 gbjar.extra_jars += [CONFIG['ANDROID_DESIGN_AAR_LIB']]
 gbjar.extra_jars += [CONFIG['ANDROID_RECYCLERVIEW_V7_AAR_LIB']]
 gbjar.extra_jars += [CONFIG['ANDROID_CUSTOMTABS_AAR_LIB']]
 gbjar.extra_jars += [CONFIG['ANDROID_PALETTE_V7_AAR_LIB']]
+gbjar.extra_jars += [CONFIG['ANDROID_CONSTRAINT_LAYOUT_AAR_LIB']]
+gbjar.extra_jars += [CONFIG['ANDROID_CONSTRAINT_LAYOUT_SOLVER_JAR_LIB']]
 
 gbjar.javac_flags += ['-Xlint:all,-deprecation,-fallthrough', '-J-Xmx512m', '-J-Xms128m']
 
 # gecko-thirdparty is a good place to put small independent libraries
 gtjar = add_java_jar('gecko-thirdparty')
 gtjar.sources += [ thirdparty_source_dir + f for f in [
     'com/booking/rtlviewpager/PagerAdapterWrapper.java',
     'com/booking/rtlviewpager/RtlViewPager.java',
--- a/python/mozboot/mozboot/android-packages.txt
+++ b/python/mozboot/mozboot/android-packages.txt
@@ -1,5 +1,6 @@
 platform-tools
 build-tools;23.0.3
 platforms;android-23
 extras;android;m2repository
 extras;google;m2repository
+extras;m2repository;com;android;support;constraint;constraint-layout;1.0.2