diff options
author | 2016-10-24 17:54:36 +0000 | |
---|---|---|
committer | 2016-10-24 19:31:19 +0000 | |
commit | f190ae115d00e649fd32ff19b4663d1f8d51171c (patch) | |
tree | d112df65a5f521ffa8942ee0f82b606aabc6e2ec /src/main/java/com/google/devtools | |
parent | 778a6cea32f760be18669326fc936d871c0403dd (diff) |
Add support for exported_plugins to android_library
AndroidLibrary already has the support for exported_plugins thanks to its use of JavaCommon.getTransitivePlugins()
RELNOTES[NEW]: android_library now has a "exported_plugins" attribute just like java_library
--
MOS_MIGRATED_REVID=137053056
Diffstat (limited to 'src/main/java/com/google/devtools')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/android/AndroidLibraryBaseRule.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLibraryBaseRule.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLibraryBaseRule.java index 14a13d6cf8..bf91e64c95 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLibraryBaseRule.java +++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLibraryBaseRule.java @@ -30,6 +30,7 @@ import com.google.devtools.build.lib.rules.android.AndroidRuleClasses.AndroidRes import com.google.devtools.build.lib.rules.java.JavaCompilationArgsProvider; import com.google.devtools.build.lib.rules.java.JavaSemantics; import com.google.devtools.build.lib.rules.java.ProguardLibraryRule; +import com.google.devtools.build.lib.util.FileTypeSet; /** * Rule definition for the android_library rule. @@ -100,6 +101,17 @@ public final class AndroidLibraryBaseRule implements RuleDefinition { that depend on this target. <code>uses-permissions</code> attributes are never exported. <!-- #END_BLAZE_RULE.ATTRIBUTE --> */ .add(attr("exports_manifest", BOOLEAN).value(false)) + /* <!-- #BLAZE_RULE(android_library).ATTRIBUTE(exported_plugins) --> + The list of <code><a href="#${link java_plugin}">java_plugin</a></code>s (e.g. annotation + processors) to export to libraries that directly depend on this library. + <p> + The specified list of <code>java_plugin</code>s will be applied to any library which + directly depends on this library, just as if that library had explicitly declared these + labels in <code><a href="${link android_library.plugins}">plugins</a></code>. + </p> + <!-- #END_BLAZE_RULE.ATTRIBUTE --> */ + .add(attr("exported_plugins", LABEL_LIST).cfg(HOST).allowedRuleClasses("java_plugin") + .allowedFileTypes(FileTypeSet.NO_FILE)) .add(attr("alwayslink", BOOLEAN).undocumented("purely informational for now")) /* <!-- #BLAZE_RULE(android_library).ATTRIBUTE(neverlink) --> Only use this library for compilation and not at runtime. |