Bug 1378410 - 4. Remove obsolete JNI binding Makefile code; r=nalexander
Remove the obsolete JNI binding code from Makefile.in. Only the binding
file names in the GARBAGE list are kept, because otherwise the build
system is unaware of these files.
MozReview-Commit-ID: LHckL5jeoPg
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -20,81 +20,16 @@ GARBAGE += \
GeneratedJNIWrappers.h \
FennecJNINatives.h \
FennecJNIWrappers.cpp \
FennecJNIWrappers.h \
$(NULL)
GARBAGE_DIRS += classes db jars res sync services generated
-# The bootclasspath is functionally identical to the classpath, but allows the
-# classes given to redefine classes in core packages, such as java.lang.
-# android.jar is here as it provides Android's definition of the Java Standard
-# Library. The compatability lib here tweaks a few of the core classes to paint
-# over changes in behaviour between versions.
-JAVA_BOOTCLASSPATH := \
- $(ANDROID_SDK)/android.jar \
- $(NULL)
-
-JAVA_BOOTCLASSPATH := $(subst $(NULL) ,:,$(strip $(JAVA_BOOTCLASSPATH)))
-
-JAVA_CLASSPATH += \
- $(ANDROID_SUPPORT_ANNOTATIONS_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) \
- $(ANDROID_CUSTOMTABS_AAR_LIB) \
- $(ANDROID_PALETTE_V7_AAR_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) \
- $(ANDROID_PLAY_SERVICES_CAST_AAR_LIB) \
- $(ANDROID_MEDIAROUTER_V7_AAR_LIB) \
- $(ANDROID_MEDIAROUTER_V7_AAR_INTERNAL_LIB) \
- $(NULL)
-endif
-
-ifdef MOZ_ANDROID_GCM
- JAVA_CLASSPATH += \
- $(ANDROID_PLAY_SERVICES_BASE_AAR_LIB) \
- $(ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB) \
- $(ANDROID_PLAY_SERVICES_GCM_AAR_LIB) \
- $(ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_LIB) \
- $(NULL)
-endif
-
-ifdef MOZ_INSTALL_TRACKING
- JAVA_CLASSPATH += \
- $(ANDROID_PLAY_SERVICES_ADS_AAR_LIB) \
- $(ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB) \
- $(NULL)
-endif
-
-# MOZ_ANDROID_MMA requires MOZ_ANDROID_GCM and MOZ_NATIVE_DEVICES,
-# which take care of the Play Services requirements in JAVA_CLASSPATH.
-# Based on the import of
-# `com.google.android.gms.ads.identifier.AdvertisingIdClient` in
-# `com.leanplum.internal.Util` one would assume that
-# `play-services-ads` is required, by in version 8.4.0 (at least) that
-# class is defined in `play-services-basement`. Therefore, unlike
-# MOZ_INSTALL_TRACKING, we don't need to depend on
-# `play-services-ads`.
-
-JAVA_CLASSPATH := $(subst $(NULL) ,:,$(strip $(JAVA_CLASSPATH)))
-
# Library jars that we're bundling: these are subject to Proguard before inclusion
# into classes.dex.
java_bundled_libs := \
$(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) \
@@ -161,18 +96,16 @@ endif
ifdef MOZ_INSTALL_TRACKING
GECKOVIEW_JARS += gecko-thirdparty-adjust_sdk.jar
endif
ifdef MOZ_ANDROID_MMA
GECKOVIEW_JARS += gecko-thirdparty-leanplum_sdk.jar
endif
-geckoview_jars_classpath := $(subst $(NULL) ,:,$(strip $(GECKOVIEW_JARS)))
-
FENNEC_JARS = \
gecko-browser.jar \
gecko-thirdparty.jar \
services.jar \
$(NULL)
ifdef MOZ_ANDROID_SEARCH_ACTIVITY
FENNEC_JARS += search-activity.jar
@@ -307,32 +240,16 @@ classycle_jar := $(topsrcdir)/mobile/and
-Xmx512m -Xms128m \
-jar $(ANDROID_SDK_ROOT)/tools/proguard/lib/proguard.jar \
@$(proguard_config_dir)/proguard.cfg \
-optimizationpasses $(PROGUARD_PASSES) \
-injars $(subst ::,:,$(all_jars_classpath)):bundled-jars-nodebug \
-outjars jars-proguarded \
-libraryjars $(library_jars)
-ANNOTATION_PROCESSOR_JAR_FILES := $(abspath $(DEPTH)/build/annotationProcessors/annotationProcessors.jar)
-
-# This annotation processing step also generates
-# GeneratedJNIWrappers.h and GeneratedJNINatives.h
-GeneratedJNIWrappers.cpp: $(ANNOTATION_PROCESSOR_JAR_FILES) $(GECKOVIEW_JARS)
- $(JAVA) -classpath $(geckoview_jars_classpath):$(JAVA_BOOTCLASSPATH):$(JAVA_CLASSPATH):$(ANNOTATION_PROCESSOR_JAR_FILES) \
- org.mozilla.gecko.annotationProcessors.AnnotationProcessor \
- Generated $(GECKOVIEW_JARS)
-
-# This annotation processing step also generates
-# FennecJNIWrappers.h and FennecJNINatives.h
-FennecJNIWrappers.cpp: $(ANNOTATION_PROCESSOR_JAR_FILES) $(FENNEC_JARS)
- $(JAVA) -classpath $(all_jars_classpath):$(JAVA_BOOTCLASSPATH):$(JAVA_CLASSPATH):$(ANNOTATION_PROCESSOR_JAR_FILES) \
- org.mozilla.gecko.annotationProcessors.AnnotationProcessor \
- Fennec $(FENNEC_JARS)
-
include $(topsrcdir)/config/rules.mk
not_android_res_files := \
*.mkdir.done* \
*.DS_Store* \
*\#* \
*.rej \
*.orig \
@@ -496,17 +413,17 @@ update-generated-wrappers:
@echo Updated generated JNI code
update-fennec-wrappers:
@cp $(CURDIR)/FennecJNIWrappers.cpp \
$(CURDIR)/FennecJNIWrappers.h \
$(CURDIR)/FennecJNINatives.h $(topsrcdir)/widget/android/fennec
@echo Updated Fennec JNI code
-.PHONY: update-generated-wrappers
+.PHONY: update-generated-wrappers update-fennec-wrappers
# This target is only used by IDE integrations. It rebuilds resources
# that end up in omni.ja using the equivalent of |mach build faster|,
# does most of the packaging step, and then updates omni.ja in
# place. If you're not using an IDE, you should be using |mach build
# mobile/android && mach package|.
$(ABS_DIST)/fennec/$(OMNIJAR_NAME): FORCE
$(REPORT_BUILD)
@@ -527,50 +444,16 @@ ifndef MOZILLA_OFFICIAL
gradle-omnijar: $(abspath $(DIST)/fennec/$(OMNIJAR_NAME))
else
# In automation, omni.ja is built only during packaging.
gradle-omnijar:
endif
.PHONY: gradle-targets gradle-omnijar
-# GeneratedJNIWrappers.cpp target also generates
-# GeneratedJNIWrappers.h and GeneratedJNINatives.h
-# FennecJNIWrappers.cpp target also generates
-# FennecJNIWrappers.h and FennecJNINatives.h
-ifndef MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE
-libs:: GeneratedJNIWrappers.cpp
- @(diff GeneratedJNIWrappers.cpp $(topsrcdir)/widget/android/GeneratedJNIWrappers.cpp >/dev/null && \
- diff GeneratedJNIWrappers.h $(topsrcdir)/widget/android/GeneratedJNIWrappers.h >/dev/null && \
- diff GeneratedJNINatives.h $(topsrcdir)/widget/android/GeneratedJNINatives.h >/dev/null) || \
- (echo '*****************************************************' && \
- echo '*** Error: The generated JNI code has changed ***' && \
- echo '* To update generated code in the tree, please run *' && \
- echo && \
- echo ' make -C $(CURDIR) update-generated-wrappers' && \
- echo && \
- echo '* Repeat the build, and check in any changes. *' && \
- echo '*****************************************************' && \
- exit 1)
-
-libs:: FennecJNIWrappers.cpp
- @(diff FennecJNIWrappers.cpp $(topsrcdir)/widget/android/fennec/FennecJNIWrappers.cpp >/dev/null && \
- diff FennecJNIWrappers.h $(topsrcdir)/widget/android/fennec/FennecJNIWrappers.h >/dev/null && \
- diff FennecJNINatives.h $(topsrcdir)/widget/android/fennec/FennecJNINatives.h >/dev/null) || \
- (echo '*****************************************************' && \
- echo '*** Error: The Fennec JNI code has changed ***' && \
- echo '* To update generated code in the tree, please run *' && \
- echo && \
- echo ' make -C $(CURDIR) update-fennec-wrappers' && \
- echo && \
- echo '* Repeat the build, and check in any changes. *' && \
- echo '*****************************************************' && \
- exit 1)
-endif
-
libs:: classes.dex
$(INSTALL) classes.dex $(FINAL_TARGET)
# Generate Java binder interfaces from AIDL files.
GECKOVIEW_AIDLS = \
org/mozilla/gecko/IGeckoEditableChild.aidl \
org/mozilla/gecko/IGeckoEditableParent.aidl \
org/mozilla/gecko/gfx/ISurfaceAllocator.aidl \