aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main
diff options
context:
space:
mode:
authorGravatar tomlu <tomlu@google.com>2018-06-20 11:18:58 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-06-20 11:20:05 -0700
commitf140cf38242666cb75977d5161ab457e287de02d (patch)
treebd1037ef82ecaff877c8ff0ce06a0927a67f5e92 /src/main
parent83545c37f506434d527b577589bebadf96146b22 (diff)
Clean out unused proto_library enforcement code.
The corresponding flags have been flipped and there should be no code in the depot that violates these rules. * Make it completely illegal for proto_library to appear in any Java/Android rule * Delete code that uses the old migration flags. * Delete tests that check that Java/Android rules *can* depend on proto_library rules when certain flags are off. * Update tests (the error messages are now slightly different) RELNOTES: None PiperOrigin-RevId: 201384236
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/android/AndroidLocalTestBase.java4
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/android/AndroidLocalTestConfiguration.java14
2 files changed, 3 insertions, 15 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLocalTestBase.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLocalTestBase.java
index e252448d4b..1c1fff8d36 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLocalTestBase.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLocalTestBase.java
@@ -85,9 +85,7 @@ public abstract class AndroidLocalTestBase implements RuleConfiguredTargetFactor
ruleContext.getFragment(AndroidLocalTestConfiguration.class);
final JavaCommon javaCommon = new JavaCommon(ruleContext, javaSemantics);
- if (androidLocalTestConfiguration.androidLocalTestUsesJavaRuleValidation()) {
- javaSemantics.checkRule(ruleContext, javaCommon);
- }
+ javaSemantics.checkRule(ruleContext, javaCommon);
// Use the regular Java javacopts. Enforcing android-compatible Java
// (-source 7 -target 7 and no TWR) is unnecessary for robolectric tests
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLocalTestConfiguration.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLocalTestConfiguration.java
index 6f3b9a1a8a..4158a4bc70 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLocalTestConfiguration.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLocalTestConfiguration.java
@@ -53,9 +53,7 @@ public class AndroidLocalTestConfiguration extends BuildConfiguration.Fragment {
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.UNKNOWN},
- help =
- "If enabled, android_local_test rules are subject to the same validation "
- + "as other Android and Java rules.")
+ help = "This attribute is deprecated and has no effect.")
public boolean androidLocalTestUsesJavaRuleValidation;
}
@@ -84,25 +82,17 @@ public class AndroidLocalTestConfiguration extends BuildConfiguration.Fragment {
}
private final boolean androidLocalTestBinaryResources;
- private final boolean androidLocalTestUsesJavaRuleValidation;
AndroidLocalTestConfiguration(Options options) {
this.androidLocalTestBinaryResources = options.androidLocalTestBinaryResources;
- this.androidLocalTestUsesJavaRuleValidation = options.androidLocalTestUsesJavaRuleValidation;
}
@AutoCodec.Instantiator
- AndroidLocalTestConfiguration(
- boolean androidLocalTestBinaryResources, boolean androidLocalTestUsesJavaRuleValidation) {
+ AndroidLocalTestConfiguration(boolean androidLocalTestBinaryResources) {
this.androidLocalTestBinaryResources = androidLocalTestBinaryResources;
- this.androidLocalTestUsesJavaRuleValidation = androidLocalTestUsesJavaRuleValidation;
}
public boolean useAndroidLocalTestBinaryResources() {
return this.androidLocalTestBinaryResources;
}
-
- public boolean androidLocalTestUsesJavaRuleValidation() {
- return androidLocalTestUsesJavaRuleValidation;
- }
}