aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2018-05-31 15:55:59 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-05-31 15:57:43 -0700
commit0c86dcf2e42f44bbac2c358a77ba5d1217eaac0f (patch)
treef9dab20539e9e4ed6d0bebe9fcd837cdc7d98ec5 /src/main/java/com/google/devtools/build
parentd3c3ea70845389168428f04d544c9441df96c6da (diff)
Remove the Blaze strict java deps exemption for Android databinding. As of
unknown commit, we are using the JavaBuilder processor exemption list instead of disabling strict deps for the affected rules outright. This narrows the degree to which the exemption is applied, and prevents other strict deps violations from accruing on targets that enable databinding. Step 2 of 2; we needed the change to roll out in JavaBuilder first to be able to fix up issues in the depot first before removing the exemption in Blaze. See https://github.com/bazelbuild/bazel/commit/7edc5d49c8e764ab2bdf19e3a9fb58ea30fa708f for the original attempt. PiperOrigin-RevId: 198793976
Diffstat (limited to 'src/main/java/com/google/devtools/build')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/android/AndroidCommon.java14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidCommon.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidCommon.java
index f9e7464e75..0d3b3f8576 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidCommon.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidCommon.java
@@ -560,19 +560,7 @@ public class AndroidCommon {
javaCommon.getJavacOpts(),
attributes,
useDataBinding ? DataBinding.processDeps(ruleContext) : ImmutableList.<Artifact>of(),
- /* We have to disable strict deps checking with data binding because data binding
- * propagates layout XML up the dependency chain. Say a library's XML references a Java
- * class, e.g.: "<variable type="some.package.SomeClass" />". Data binding's annotation
- * processor triggers a compile against SomeClass. Because data binding reprocesses
- * bindings each step up the dependency chain (via merged resources), that means this
- * compile also happens at the top-level binary. Since SomeClass.java is declared in the
- * library, this creates a strict deps violation.
- *
- * This weakening of strict deps is unfortunate and deserves to be fixed. Once data
- * binding integrates with aapt2 this problem should naturally go away (since
- * reprocessing will no longer happen).
- */
- /*disableStrictDeps=*/ useDataBinding);
+ /*disableStrictDeps=*/ false);
helper.addLibrariesToAttributes(javaCommon.targetsTreatedAsDeps(ClasspathType.COMPILE_ONLY));
attributes.setTargetLabel(ruleContext.getLabel());