aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/android/AndroidResourcesProcessorBuilder.java
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2016-05-04 23:15:00 +0000
committerGravatar Kristina Chodorow <kchodorow@google.com>2016-05-05 19:10:24 +0000
commit88ccf0c9f490a5138719c3bb476b17eb1d8384e2 (patch)
treed5592d85c0f06d941b5f9dac26fccebf0190796f /src/main/java/com/google/devtools/build/lib/rules/android/AndroidResourcesProcessorBuilder.java
parent1f2cb5c56291efab2989e6a342898560ebef3fca (diff)
[Android] Support aapt-generated main dex specs.
Add bazel support for using the "aapt -D" command to generate a proguard specification for components which need to be in the main dex. -- MOS_MIGRATED_REVID=121531584
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.java11
1 files changed, 11 insertions, 0 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 2c3606f1e1..7967f92934 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
@@ -58,6 +58,7 @@ public class AndroidResourcesProcessorBuilder {
private ResourceContainer primary;
private ResourceDependencies dependencies;
private Artifact proguardOut;
+ private Artifact mainDexProguardOut;
private Artifact rTxtOut;
private Artifact sourceJarOut;
private boolean debug = false;
@@ -134,6 +135,11 @@ public class AndroidResourcesProcessorBuilder {
return this;
}
+ public AndroidResourcesProcessorBuilder setMainDexProguardOut(Artifact mainDexProguardCfg) {
+ this.mainDexProguardOut = mainDexProguardCfg;
+ return this;
+ }
+
public AndroidResourcesProcessorBuilder setRTxtOut(Artifact rTxtOut) {
this.rTxtOut = rTxtOut;
return this;
@@ -308,6 +314,11 @@ public class AndroidResourcesProcessorBuilder {
outs.add(proguardOut);
}
+ if (mainDexProguardOut != null) {
+ builder.addExecPath("--mainDexProguardOutput", mainDexProguardOut);
+ outs.add(mainDexProguardOut);
+ }
+
if (manifestOut != null) {
builder.addExecPath("--manifestOutput", manifestOut);
outs.add(manifestOut);