aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/android/ResourceShrinkerActionBuilder.java
diff options
context:
space:
mode:
authorGravatar asteinb <asteinb@google.com>2018-04-18 07:46:20 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-04-18 07:47:34 -0700
commit9e76d242beb562e8337caf5529f0e6a151399b28 (patch)
tree05e47c8e94e4749a69c21596af41cb76e8e79243 /src/main/java/com/google/devtools/build/lib/rules/android/ResourceShrinkerActionBuilder.java
parent83da8ccd5716f5be19f9be8e36949c58a3f741eb (diff)
Ability to stop using ResourceContainer in various actions
Now that we support decoupled asset and resource processing in the basic pipeline, we can also support it in these actions. ResourceShrinker actions, by design, does not use assets, so the change is trivial. For the AarGenerator, things get a bit more complex: - Simplify needlessly complex code around AAR generation - Move around special resource processing to generate AAR inputs in the case where there are no local resources to go next to normal resource processing - Also, clean up that code - ResourceApk wrapper class has some fields which are non-null even in the case where resources are inherited - Always pass assets and resources seperately to the AarGenerator action RELNOTES: none PiperOrigin-RevId: 193355790
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/android/ResourceShrinkerActionBuilder.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/android/ResourceShrinkerActionBuilder.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/ResourceShrinkerActionBuilder.java b/src/main/java/com/google/devtools/build/lib/rules/android/ResourceShrinkerActionBuilder.java
index 6864d1ab68..70dfa8b3b8 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/ResourceShrinkerActionBuilder.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/ResourceShrinkerActionBuilder.java
@@ -38,7 +38,7 @@ public class ResourceShrinkerActionBuilder {
private Artifact resourceFilesZip;
private Artifact shrunkJar;
private Artifact proguardMapping;
- private ResourceContainer primaryResources;
+ private ValidatedAndroidData primaryResources;
private ResourceDependencies dependencyResources;
private Artifact resourceApkOut;
private Artifact shrunkResourcesOut;
@@ -91,10 +91,10 @@ public class ResourceShrinkerActionBuilder {
}
/**
- * @param primary The fully processed {@link ResourceContainer} of the resources to be shrunk.
+ * @param primary The fully processed {@link ValidatedAndroidData} of the resources to be shrunk.
* Must contain both an R.txt and merged manifest.
*/
- public ResourceShrinkerActionBuilder withPrimary(ResourceContainer primary) {
+ public ResourceShrinkerActionBuilder withPrimary(ValidatedAndroidData primary) {
checkNotNull(primary);
checkNotNull(primary.getManifest());
checkNotNull(primary.getRTxt());
@@ -245,7 +245,7 @@ public class ResourceShrinkerActionBuilder {
}
private ImmutableList<String> getResourcePackages(
- ResourceContainer primaryResources, ResourceDependencies resourceDependencies) {
+ ValidatedAndroidData primaryResources, ResourceDependencies resourceDependencies) {
ImmutableList.Builder<String> resourcePackages = ImmutableList.builder();
resourcePackages.add(primaryResources.getJavaPackage());
for (ValidatedAndroidData resources : resourceDependencies.getResourceContainers()) {