From f2870bd3a62e627ecc0fe5bfb6685cd2b172b423 Mon Sep 17 00:00:00 2001 From: Nick Alexander Date: Thu, 25 Jun 2015 16:48:15 -0700 Subject: [PATCH] Bug 1174757 - Pre: Don't archive geckoview resources when not necessary. r=glandium This is a small optimization that will also make it easier to flip the MOZ_DISABLE_GECKOVIEW conditional. We don't currently package geckolibs without geckoview, and it's reasonable to do both if we want one. --HG-- extra : commitid : FcLlG6E3PRQ extra : rebase_source : ea22994bfa6815468763128995d41c0d6c625d60 extra : histedit_source : a25e0c5c4b5a97bde8871b5e4139e0f0fd4f6a36 --- mobile/android/base/Makefile.in | 8 +++++++- toolkit/mozapps/installer/upload-files.mk | 6 +++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/mobile/android/base/Makefile.in b/mobile/android/base/Makefile.in index 75884c9acf75..1ad17b0d9737 100644 --- a/mobile/android/base/Makefile.in +++ b/mobile/android/base/Makefile.in @@ -355,12 +355,14 @@ cd $(2) && zip -q $(1) -r * -x $(subst *,\*,$(not_android_res_files)) endef +ifndef MOZ_DISABLE_GECKOVIEW # We delete the archive before updating so that resources removed from # the filesystem are removed from the archive. geckoview_resources.zip: $(all_resources) $(GLOBAL_DEPS) $(REPORT_BUILD) $(RM) -rf $@ $(foreach dir,$(ANDROID_RES_DIRS),$(call zip_directory_with_relative_paths,$(CURDIR)/$@,$(dir))) +endif # All of generated/org/mozilla/gecko/R.java, gecko.ap_, and R.txt are # produced by aapt; this saves aapt invocations. The trailing @@ -493,8 +495,12 @@ gradle-omnijar: $(abspath $(DIST)/fennec/$(OMNIJAR_NAME)) .PHONY: gradle-targets gradle-omnijar -libs:: geckoview_resources.zip classes.dex jni-stubs.inc GeneratedJNIWrappers.cpp $(CURDIR)/fennec_ids.txt +ifndef MOZ_DISABLE_GECKOVIEW +libs:: geckoview_resources.zip $(INSTALL) geckoview_resources.zip $(FINAL_TARGET) +endif + +libs:: classes.dex jni-stubs.inc GeneratedJNIWrappers.cpp $(CURDIR)/fennec_ids.txt $(INSTALL) classes.dex $(FINAL_TARGET) @(diff jni-stubs.inc $(topsrcdir)/mozglue/android/jni-stubs.inc >/dev/null && diff GeneratedJNIWrappers.cpp $(topsrcdir)/widget/android/GeneratedJNIWrappers.cpp >/dev/null) || \ (echo '*****************************************************' && \ diff --git a/toolkit/mozapps/installer/upload-files.mk b/toolkit/mozapps/installer/upload-files.mk index 7b646ede0fdd..278ce2ee1c5f 100644 --- a/toolkit/mozapps/installer/upload-files.mk +++ b/toolkit/mozapps/installer/upload-files.mk @@ -367,6 +367,7 @@ endif # Create Android ARchives and metadata for download by local # developers using Gradle. ifdef MOZ_ANDROID_GECKOLIBS_AAR +ifndef MOZ_DISABLE_GECKOVIEW geckoaar-revision := $(BUILDID) UPLOAD_EXTRA_FILES += \ @@ -392,8 +393,11 @@ INNER_MAKE_GECKOLIBS_AAR= \ --distdir '$(_ABS_DIST)' \ '$(_ABS_DIST)' else +INNER_MAKE_GECKOLIBS_AAR=echo 'Android geckolibs.aar packaging requires packaging geckoview' +endif # MOZ_DISABLE_GECKOVIEW +else INNER_MAKE_GECKOLIBS_AAR=echo 'Android geckolibs.aar packaging is disabled' -endif +endif # MOZ_ANDROID_GECKOLIBS_AAR ifdef MOZ_OMX_PLUGIN DIST_FILES += libomxplugin.so libomxplugingb.so libomxplugingb235.so \