diff options
author | 2016-01-25 14:16:50 +0000 | |
---|---|---|
committer | 2016-01-25 16:52:18 +0000 | |
commit | 44f145875cf7c2ab76d92139ac7b14a256eae532 (patch) | |
tree | 3253881906176065a6ac91699374cbfb8a718689 /src/main/java/com/google/devtools/build/lib/rules/android/AndroidResourcesProcessorBuilder.java | |
parent | 9e16f0ad1016a28d04c498b60d4845169c2ce497 (diff) |
Export the AndroidManifest.xml from the resource processing. This is an initial step toward changing the manifest merge to use the Gradle merger, as well as ensuring the custom library package is reflected in the manifest.
--
MOS_MIGRATED_REVID=112943820
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/android/AndroidResourcesProcessorBuilder.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/android/AndroidResourcesProcessorBuilder.java | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidResourcesProcessorBuilder.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidResourcesProcessorBuilder.java index 915c8eb7be..ee9970874f 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidResourcesProcessorBuilder.java +++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidResourcesProcessorBuilder.java @@ -75,6 +75,8 @@ public class AndroidResourcesProcessorBuilder { private String versionName; private Artifact symbolsTxt; + private Artifact manifestOut; + /** * @param ruleContext The RuleContext that was used to create the SpawnAction.Builder. */ @@ -149,6 +151,11 @@ public class AndroidResourcesProcessorBuilder { return this; } + public AndroidResourcesProcessorBuilder setManifestOut(Artifact manifestOut) { + this.manifestOut = manifestOut; + return this; + } + private static class ResourceContainerToArg implements Function<ResourceContainer, String> { private boolean includeSymbols; @@ -278,6 +285,12 @@ public class AndroidResourcesProcessorBuilder { builder.addExecPath("--proguardOutput", proguardOut); outs.add(proguardOut); } + + if (manifestOut != null) { + builder.addExecPath("--manifestOutput", manifestOut); + outs.add(manifestOut); + } + if (apkOut != null) { builder.addExecPath("--packagePath", apkOut); outs.add(apkOut); @@ -339,7 +352,8 @@ public class AndroidResourcesProcessorBuilder { // for this resource processing action (in case of just creating an R.txt or // proguard merging), reuse the primary resource from the dependencies. apkOut != null ? apkOut : primary.getApk(), - primary.getManifest(), sourceJarOut, + manifestOut != null ? manifestOut : primary.getManifest(), + sourceJarOut, primary.getArtifacts(ResourceType.ASSETS), primary.getArtifacts(ResourceType.RESOURCES), primary.getRoots(ResourceType.ASSETS), |