From 08a409df2d2b6a6b04b0edbdeb2a689fe268376e Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 29 Apr 2019 10:22:44 -0700 Subject: [PATCH] Reverse merge order of resources and implementation Merge the resources first in case one of the static libraries merge into the implementation jars contains a duplicate resource. Also put the manifest into the resource jar so that the default manifest doens't override the custom manifest. Test: m checkbuild Change-Id: I96d117c306bc9f1346720251d3993031992cef66 --- java/java.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/java.go b/java/java.go index 6168b38d4..47dd95724 100644 --- a/java/java.go +++ b/java/java.go @@ -1253,9 +1253,9 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars ...android.Path // merge implementation jar with resources if necessary implementationAndResourcesJar := outputFile if j.resourceJar != nil { - jars := android.Paths{implementationAndResourcesJar, j.resourceJar} + jars := android.Paths{j.resourceJar, implementationAndResourcesJar} combinedJar := android.PathForModuleOut(ctx, "withres", jarName) - TransformJarsToJar(ctx, combinedJar, "for resources", jars, android.OptionalPath{}, + TransformJarsToJar(ctx, combinedJar, "for resources", jars, manifest, false, nil, nil) implementationAndResourcesJar = combinedJar }