Bug 1380639 - Add constraint layout solver JAR to build. draft
authorSebastian Kaspari <s.kaspari@gmail.com>
Fri, 14 Jul 2017 13:58:48 +0200
changeset 608970 37bd74c3e63ee250d8e666f2beb8428bb49fc649
parent 608969 13dce0a9f3602e3a03418bc43a31d68391dfd4c7
child 637465 5c0ba8f1971278283cb80df1e6eef36d15c5a9dc
push id68461
push users.kaspari@gmail.com
push dateFri, 14 Jul 2017 12:04:37 +0000
bugs1380639
milestone56.0a1
Bug 1380639 - Add constraint layout solver JAR to build. MozReview-Commit-ID: IyiW0Ugig9X
build/autoconf/android.m4
mobile/android/base/Makefile.in
mobile/android/base/moz.build
--- a/build/autoconf/android.m4
+++ b/build/autoconf/android.m4
@@ -370,16 +370,27 @@ case "$target" in
     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_CONSTRAINT_AAR(constraint-layout, "1.0.2")
 
+
+    ANDROID_CONSTRAINT_LAYOUT_SOLVER_JAR="$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 ; 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)])
+    fi
+    AC_MSG_RESULT([$ANDROID_CONSTRAINT_LAYOUT_SOLVER_JAR])
+    AC_SUBST(ANDROID_CONSTRAINT_LAYOUT_SOLVER_JAR)
+    ANDROID_CONSTRAINT_LAYOUT_SOLVER_JAR_LIB=$ANDROID_CONSTRAINT_LAYOUT_SOLVER_JAR
+    AC_SUBST(ANDROID_CONSTRAINT_LAYOUT_SOLVER_JAR_LIB)
+
     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"
     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)])
     fi
     AC_MSG_RESULT([$ANDROID_SUPPORT_ANNOTATIONS_JAR])
     AC_SUBST(ANDROID_SUPPORT_ANNOTATIONS_JAR)
     ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB=$ANDROID_SUPPORT_ANNOTATIONS_JAR
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -33,16 +33,17 @@ GARBAGE_DIRS += classes db jars res sync
 JAVA_BOOTCLASSPATH := \
     $(ANDROID_SDK)/android.jar \
     $(NULL)
 
 JAVA_BOOTCLASSPATH := $(subst $(NULL) ,:,$(strip $(JAVA_BOOTCLASSPATH)))
 
 JAVA_CLASSPATH += \
     $(ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB) \
+    $(ANDROID_CONSTRAINT_LAYOUT_SOLVER_JAR_LIB) \
     $(ANDROID_SUPPORT_V4_AAR_LIB) \
     $(ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB) \
     $(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) \
--- a/mobile/android/base/moz.build
+++ b/mobile/android/base/moz.build
@@ -163,16 +163,17 @@ constants_jar.sources += ['java/org/mozi
 constants_jar.generated_sources = [
     '../geckoview/generated/preprocessed/org/mozilla/geckoview/BuildConfig.java',
     'generated/preprocessed/org/mozilla/gecko/AdjustConstants.java',
     'generated/preprocessed/org/mozilla/gecko/AppConstants.java',
     'generated/preprocessed/org/mozilla/gecko/MmaConstants.java',
 ]
 constants_jar.extra_jars = [
     CONFIG['ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB'],
+    CONFIG['ANDROID_CONSTRAINT_LAYOUT_SOLVER_JAR_LIB'],
     CONFIG['ANDROID_SUPPORT_V4_AAR_LIB'],
     CONFIG['ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB'],
     CONFIG['ANDROID_APPCOMPAT_V7_AAR_LIB'],
 ]
 
 if CONFIG['MOZ_INSTALL_TRACKING']:
     constants_jar.sources += ['java/org/mozilla/gecko/' + x for x in [
         'adjust/AdjustHelper.java',
@@ -255,16 +256,17 @@ mgjar.sources += [geckoview_source_dir +
     'mozglue/NativeReference.java',
     'mozglue/NativeZip.java',
     'mozglue/SafeIntent.java',
     'mozglue/SharedMemory.java',
 ]]
 mgjar.generated_sources = [] # Keep it this way.
 mgjar.extra_jars += [
     CONFIG['ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB'],
+    CONFIG['ANDROID_CONSTRAINT_LAYOUT_SOLVER_JAR_LIB'],
     'constants.jar',
 ]
 mgjar.javac_flags += ['-Xlint:all']
 
 gujar = add_java_jar('gecko-util')
 gujar.sources += [geckoview_source_dir + 'java/org/mozilla/gecko/' + x for x in [
     'util/ActivityResultHandler.java',
     'util/ActivityResultHandlerMap.java',
@@ -301,29 +303,31 @@ gujar.sources += [geckoview_source_dir +
     'util/UUIDUtil.java',
     'util/WeakReferenceHandler.java',
     'util/WindowUtils.java',
 ]]
 gujar.extra_jars = [
     CONFIG['ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB'],
     CONFIG['ANDROID_SUPPORT_V4_AAR_LIB'],
     CONFIG['ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB'],
+    CONFIG['ANDROID_CONSTRAINT_LAYOUT_SOLVER_JAR_LIB'],
     'constants.jar',
     'gecko-mozglue.jar',
 ]
 gujar.javac_flags += ['-Xlint:all,-deprecation']
 
 stjar = add_java_jar('sync-thirdparty')
 stjar.sources += [ thirdparty_source_dir + f for f in sync_thirdparty_java_files ]
 stjar.javac_flags = ['-Xlint:none']
 
 services_jar = add_java_jar('services')
 services_jar.sources += sync_java_files
 services_jar.extra_jars = [
     CONFIG['ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB'],
+    CONFIG['ANDROID_CONSTRAINT_LAYOUT_SOLVER_JAR_LIB'],
     CONFIG['ANDROID_SUPPORT_V4_AAR_LIB'],
     CONFIG['ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB'],
     CONFIG['ANDROID_APPCOMPAT_V7_AAR_LIB'],
     'constants.jar',
     'gecko-R.jar',
     'gecko-mozglue.jar',
     'gecko-thirdparty.jar',
     'gecko-util.jar',
@@ -475,16 +479,17 @@ if CONFIG['MOZ_ANDROID_HLS_SUPPORT']:
         'media/GeckoHlsRendererBase.java',
         'media/GeckoHlsVideoRenderer.java',
         'media/Utils.java',
     ]]
 
 
 gvjar.extra_jars += [
     CONFIG['ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB'],
+    CONFIG['ANDROID_CONSTRAINT_LAYOUT_SOLVER_JAR_LIB'],
     CONFIG['ANDROID_SUPPORT_V4_AAR_LIB'],
     CONFIG['ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB'],
     'constants.jar',
     'gecko-mozglue.jar',
     'gecko-util.jar',
 ]
 
 gvjar.javac_flags += [
@@ -1025,16 +1030,17 @@ else:
         'skin/SkinConfig.java',
         'toolbar/TabCounter.java',
     ]]
 
 android_package_dir = CONFIG['ANDROID_PACKAGE_NAME'].replace('.', '/')
 gbjar.generated_sources = [] # Keep it this way.
 gbjar.extra_jars += [
     CONFIG['ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB'],
+    CONFIG['ANDROID_CONSTRAINT_LAYOUT_SOLVER_JAR_LIB'],
     CONFIG['ANDROID_SUPPORT_V4_AAR_LIB'],
     CONFIG['ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB'],
     'constants.jar',
 ]
 if CONFIG['MOZ_CRASHREPORTER']:
     gbjar.sources += [ 'java/org/mozilla/gecko/CrashReporter.java' ]
     ANDROID_RES_DIRS += [ 'crashreporter/res' ]
 
@@ -1214,16 +1220,17 @@ gtjar.sources += [ thirdparty_source_dir
     'com/squareup/picasso/Target.java',
     'com/squareup/picasso/TargetAction.java',
     'com/squareup/picasso/Transformation.java',
     'com/squareup/picasso/UrlConnectionDownloader.java',
     'com/squareup/picasso/Utils.java'
 ] ]
 gtjar.extra_jars = [
     CONFIG['ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB'],
+    CONFIG['ANDROID_CONSTRAINT_LAYOUT_SOLVER_JAR_LIB'],
     CONFIG['ANDROID_SUPPORT_V4_AAR_LIB'],
     CONFIG['ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB'],
 ]
 
 if not CONFIG['MOZILLA_OFFICIAL']:
     gtjar.sources += [ thirdparty_source_dir + f for f in [
         'org/lucasr/dspec/DesignSpec.java',
         'org/lucasr/dspec/RawResource.java'
@@ -1374,16 +1381,17 @@ if CONFIG['MOZ_ANDROID_MMA']:
     ] ]
     lpjar.extra_jars += [
         CONFIG['ANDROID_APPCOMPAT_V7_AAR_LIB'],
         CONFIG['ANDROID_PLAY_SERVICES_ADS_AAR_LIB'],
         CONFIG['ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB'],
         CONFIG['ANDROID_PLAY_SERVICES_BASE_AAR_LIB'],
         CONFIG['ANDROID_PLAY_SERVICES_GCM_AAR_LIB'],
         CONFIG['ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB'],
+        CONFIG['ANDROID_CONSTRAINT_LAYOUT_SOLVER_JAR_LIB'],
         CONFIG['ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB'],
         CONFIG['ANDROID_SUPPORT_V4_AAR_LIB'],
         'sync-thirdparty.jar',
     ]
 
 # Putting branding earlier allows branders to override default resources.
 ANDROID_RES_DIRS += [
     '/' + CONFIG['MOZ_BRANDING_DIRECTORY'] + '/res',
@@ -1430,16 +1438,17 @@ if CONFIG['MOZ_ANDROID_SEARCH_ACTIVITY']
     search_source_dir = SRCDIR + '/../search'
     include('../search/search_activity_sources.mozbuild')
 
     search_activity = add_java_jar('search-activity')
     search_activity.sources += [search_source_dir + '/' + f for f in search_activity_sources]
     search_activity.javac_flags += ['-Xlint:all']
     search_activity.extra_jars = [
         CONFIG['ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB'],
+        CONFIG['ANDROID_CONSTRAINT_LAYOUT_SOLVER_JAR_LIB'],
         CONFIG['ANDROID_SUPPORT_V4_AAR_LIB'],
         CONFIG['ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB'],
         'constants.jar',
         'gecko-R.jar',
         'gecko-browser.jar',
         'gecko-mozglue.jar',
         'gecko-thirdparty.jar',
         'gecko-util.jar',