aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/android/ApplicationManifest.java
diff options
context:
space:
mode:
authorGravatar Lukacs Berki <lberki@google.com>2015-09-08 12:19:44 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2015-09-08 12:23:00 +0000
commit240eb7888627967252229979c3029097f58cbb38 (patch)
tree9c07a7205582ad0dc2af5c203b53bf4cb90f6770 /src/main/java/com/google/devtools/build/lib/rules/android/ApplicationManifest.java
parent87a3c4932eef7c7f33cfed49e1e67680a75df658 (diff)
Make Android rules work again
They were broken by commit 05e2c5b4e0da2f88e12d95adbc63cc3d46a6fca6. -- MOS_MIGRATED_REVID=102546907
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/android/ApplicationManifest.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/android/ApplicationManifest.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/ApplicationManifest.java b/src/main/java/com/google/devtools/build/lib/rules/android/ApplicationManifest.java
index e1f84e7feb..2b5e999a66 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/ApplicationManifest.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/ApplicationManifest.java
@@ -89,12 +89,10 @@ public final class ApplicationManifest {
return ruleContext.attributes().get("application_id", Type.STRING);
}
- TransitiveInfoCollection resourcesPrerequisite =
- ruleContext.getPrerequisite("resources", Mode.TARGET);
- if (resourcesPrerequisite != null) {
+ AndroidResourcesProvider resourcesProvider = AndroidCommon.getAndroidResources(ruleContext);
+ if (resourcesProvider != null) {
ResourceContainer resourceContainer = Iterables.getOnlyElement(
- resourcesPrerequisite.getProvider(AndroidResourcesProvider.class)
- .getTransitiveAndroidResources());
+ resourcesProvider.getTransitiveAndroidResources());
return resourceContainer.getRenameManifestPackage();
} else {
return null;