aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com
diff options
context:
space:
mode:
authorGravatar asteinb <asteinb@google.com>2018-05-25 12:11:33 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-05-25 12:13:12 -0700
commit2897a1dbbc83f1b81f16d2de25b299e459c3a90f (patch)
treecc24cfec3e1997bf662154e7fb7347bd86975365 /src/main/java/com
parent0e6396c01754fb1f03c673a98083d4495ce4bd8d (diff)
Automated rollback of commit fd260c56b46fbf68a07b29b0fc1b8cdecc4fe854.
*** Reason for rollback *** Roll forward after fixing and rolling forward culprit CL. No changes besides rolling forward (masked by diffbase) RELNOTES: none PiperOrigin-RevId: 198084160
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/android/AndroidDataContext.java24
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/android/ProcessedAndroidData.java2
2 files changed, 8 insertions, 18 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidDataContext.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidDataContext.java
index e894fbc2c9..8d52db5e90 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidDataContext.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidDataContext.java
@@ -43,8 +43,6 @@ import com.google.devtools.build.lib.skylarkinterface.SkylarkModule;
+ " manifests")
public class AndroidDataContext {
- private final RuleContext ruleContext;
-
private final Label label;
private final ActionConstructionContext actionConstructionContext;
private final FilesToRunProvider busybox;
@@ -56,16 +54,19 @@ public class AndroidDataContext {
public static AndroidDataContext makeContext(RuleContext ruleContext) {
return new AndroidDataContext(
+ ruleContext.getLabel(),
ruleContext,
ruleContext.getExecutablePrerequisite("$android_resources_busybox", Mode.HOST),
AndroidSdkProvider.fromRuleContext(ruleContext));
}
protected AndroidDataContext(
- RuleContext ruleContext, FilesToRunProvider busybox, AndroidSdkProvider sdk) {
- this.ruleContext = ruleContext;
- this.label = ruleContext.getLabel();
- this.actionConstructionContext = ruleContext;
+ Label label,
+ ActionConstructionContext actionConstructionContext,
+ FilesToRunProvider busybox,
+ AndroidSdkProvider sdk) {
+ this.label = label;
+ this.actionConstructionContext = actionConstructionContext;
this.busybox = busybox;
this.sdk = sdk;
}
@@ -86,17 +87,6 @@ public class AndroidDataContext {
return sdk;
}
- /**
- * Gets the current RuleContext.
- *
- * @deprecated RuleContext is only exposed to help migrate away from it. New code should only be
- * written using other methods from this class.
- */
- @Deprecated
- public RuleContext getRuleContext() {
- return ruleContext;
- }
-
/*
* Convenience methods. These are just slightly cleaner ways of doing common tasks.
*/
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/ProcessedAndroidData.java b/src/main/java/com/google/devtools/build/lib/rules/android/ProcessedAndroidData.java
index a9d4267978..0a1871051a 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/ProcessedAndroidData.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/ProcessedAndroidData.java
@@ -90,7 +90,7 @@ public class ProcessedAndroidData {
.conditionalKeepRules(conditionalKeepRules)
.setDataBindingInfoZip(
dataBindingEnabled
- ? DataBinding.getLayoutInfoFile(dataContext.getRuleContext())
+ ? DataBinding.getLayoutInfoFile(dataContext.getActionConstructionContext())
: null)
.setFeatureOf(featureOf)
.setFeatureAfter(featureAfter);