Pass --remove-tools-declarations to manifest merger
Manifest merger needs --remove-tools-declarations to match
Gradle behavior.
Bug: 112607039
Test: m checkbuild
Change-Id: Id93bcaeaf03770a4acd2e1fdf44e418f55540dd3
diff --git a/java/aar.go b/java/aar.go
index 3af7610..6d40a8a 100644
--- a/java/aar.go
+++ b/java/aar.go
@@ -206,7 +206,7 @@
a.transitiveManifestPaths = append(android.Paths{manifestPath}, transitiveStaticLibManifests...)
if len(transitiveStaticLibManifests) > 0 {
- a.mergedManifestFile = manifestMerger(ctx, manifestPath, transitiveStaticLibManifests)
+ a.mergedManifestFile = manifestMerger(ctx, manifestPath, transitiveStaticLibManifests, a.isLibrary)
if !a.isLibrary {
// Only use the merged manifest for applications. For libraries, the transitive closure of manifests
// will be propagated to the final application and merged there. The merged manifest for libraries is