diff options
author | 2015-05-20 00:00:05 +0000 | |
---|---|---|
committer | 2015-05-21 09:46:19 +0000 | |
commit | bdaa4616a639d4cbdc333e9f932dd216c3fd2959 (patch) | |
tree | f8cb879501c8ad440db2835a5c344a0c8ccbb8e9 | |
parent | 66b35f3d069a77e5da685099d3ba3c0a0f5e844b (diff) |
Relax strict java deps for tiktok's component processor
--
MOS_MIGRATED_REVID=94040936
-rw-r--r-- | src/java_tools/buildjar/java/com/google/devtools/build/buildjar/javac/plugins/dependency/StrictJavaDepsPlugin.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/javac/plugins/dependency/StrictJavaDepsPlugin.java b/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/javac/plugins/dependency/StrictJavaDepsPlugin.java index da57a8f970..d2c4b5b578 100644 --- a/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/javac/plugins/dependency/StrictJavaDepsPlugin.java +++ b/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/javac/plugins/dependency/StrictJavaDepsPlugin.java @@ -325,6 +325,11 @@ public final class StrictJavaDepsPlugin extends BlazeJavaCompilerPlugin { } } + private static final String TIKTOK_COMPONENT_PROCESSOR_NAME = + "com.google.apps.tiktok.inject.processor.ComponentProcessor"; + + private static final String DAGGER_PROCESSOR_PREFIX = "dagger."; + public static boolean generatedByDagger(JCTree.JCClassDecl tree) { if (tree.sym == null) { return false; @@ -334,7 +339,11 @@ public final class StrictJavaDepsPlugin extends BlazeJavaCompilerPlugin { return false; } for (String value : generated.value()) { - if (value.startsWith("dagger.")) { + if (value.startsWith(DAGGER_PROCESSOR_PREFIX)) { + return true; + } + // additional exemption for tiktok (b/21307381) + if (value.equals(TIKTOK_COMPONENT_PROCESSOR_NAME)) { return true; } } |