diff --git a/core/android_manifest.mk b/core/android_manifest.mk index 0093e0208..7d573d3fc 100644 --- a/core/android_manifest.mk +++ b/core/android_manifest.mk @@ -34,10 +34,12 @@ ifdef my_full_libs_manifest_files main_android_manifest := $(full_android_manifest) full_android_manifest := $(intermediates.COMMON)/AndroidManifest.xml $(full_android_manifest): PRIVATE_LIBS_MANIFESTS := $(my_full_libs_manifest_files) +$(full_android_manifest): $(ANDROID_MANIFEST_MERGER_CLASSPATH) $(full_android_manifest) : $(main_android_manifest) $(my_full_libs_manifest_deps) @echo "Merge android manifest files: $@ <-- $< $(PRIVATE_LIBS_MANIFESTS)" @mkdir -p $(dir $@) - $(hide) $(ANDROID_MANIFEST_MERGER) --main $< --libs $(PRIVATE_LIBS_MANIFESTS) \ + $(hide) $(ANDROID_MANIFEST_MERGER) --main $< \ + --libs $(call normalize-path-list,$(PRIVATE_LIBS_MANIFESTS)) \ --out $@ endif diff --git a/core/config.mk b/core/config.mk index f74f5b4fc..eab8553f9 100644 --- a/core/config.mk +++ b/core/config.mk @@ -675,7 +675,14 @@ FINDBUGS := $(FINDBUGS_DIR)/findbugs JACOCO_CLI_JAR := $(HOST_OUT_JAVA_LIBRARIES)/jacoco-cli$(COMMON_JAVA_PACKAGE_SUFFIX) # Tool to merge AndroidManifest.xmls -ANDROID_MANIFEST_MERGER := $(JAVA) -classpath prebuilts/devtools/tools/lib/manifest-merger.jar com.android.manifmerger.Main merge +ANDROID_MANIFEST_MERGER_CLASSPATH := \ + prebuilts/gradle-plugin/com/android/tools/build/manifest-merger/25.3.1/manifest-merger-25.3.1.jar \ + prebuilts/gradle-plugin/com/android/tools/sdk-common/25.3.1/sdk-common-25.3.1.jar \ + prebuilts/gradle-plugin/com/android/tools/common/25.3.1/common-25.3.1.jar \ + prebuilts/misc/common/guava/guava-18.0.jar +ANDROID_MANIFEST_MERGER := $(JAVA) \ + -classpath $(subst $(space),:,$(strip $(ANDROID_MANIFEST_MERGER_CLASSPATH))) \ + com.android.manifmerger.Merger COLUMN:= column