diff options
author | 2015-07-09 07:18:46 +0000 | |
---|---|---|
committer | 2015-07-10 17:17:13 +0000 | |
commit | 5609c092136ee252b7936708e5d41d5c29bee097 (patch) | |
tree | f0be723995bb15837a1bccfbc25ab3e8792dfaae /src/main/java/com/google/devtools/build/lib | |
parent | f445ea186018e78ba512ba34e9be9de9d0aa2fda (diff) |
Make android_binary rules with the application_id= attribute set the correct package name for mobile-install.
--
MOS_MIGRATED_REVID=97849200
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/android/ApplicationManifest.java | 4 |
1 files changed, 4 insertions, 0 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 85de50a0fb..a379cc0227 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 @@ -84,6 +84,10 @@ public final class ApplicationManifest { private String getOverridePackage(RuleContext ruleContext) { // It seems that we sometimes rename the app for God-knows-what reason. If that is the case, // pass this information to the stubifier script. + if (ruleContext.attributes().isAttributeValueExplicitlySpecified("application_id")) { + return ruleContext.attributes().get("application_id", Type.STRING); + } + TransitiveInfoCollection resourcesPrerequisite = ruleContext.getPrerequisite("resources", Mode.TARGET); if (resourcesPrerequisite != null) { |