From e2b1a0ceaffae93f5ec8b9b3204588ec591fc182 Mon Sep 17 00:00:00 2001
From: Googler
android_library
,
@@ -79,7 +80,9 @@ public final class AndroidLibraryBaseRule implements RuleDefinition {
cc_library
wrapping or producing .so
native libraries
for the Android target platform.
*/
- .override(builder.copy("deps")
+ .override(
+ builder
+ .copy("deps")
.allowedRuleClasses(AndroidRuleClasses.ALLOWED_DEPENDENCIES)
.allowedFileTypes()
.aspect(androidNeverlinkAspect))
@@ -89,10 +92,11 @@ public final class AndroidLibraryBaseRule implements RuleDefinition {
target with exports
.
The exports
are not direct deps of the rule they belong to.
android_binary
targets
that depend on this target. uses-permissions
attributes are never exported.
@@ -107,7 +111,10 @@ public final class AndroidLibraryBaseRule implements RuleDefinition {
labels in plugins
.
*/
- .add(attr("exported_plugins", LABEL_LIST).cfg(HOST).allowedRuleClasses("java_plugin")
+ .add(
+ attr("exported_plugins", LABEL_LIST)
+ .cfg(HOST)
+ .allowedRuleClasses("java_plugin")
.allowedFileTypes(FileTypeSet.NO_FILE))
.add(attr("alwayslink", BOOLEAN).undocumented("purely informational for now"))
/*
@@ -142,8 +149,10 @@ public final class AndroidLibraryBaseRule implements RuleDefinition {
See the description of idl_import_root
for information about what this means.
*/
- .add(attr("idl_srcs", LABEL_LIST).direct_compile_time_input()
- .allowedFileTypes(AndroidRuleClasses.ANDROID_IDL))
+ .add(
+ attr("idl_srcs", LABEL_LIST)
+ .direct_compile_time_input()
+ .allowedFileTypes(AndroidRuleClasses.ANDROID_IDL))
/*
List of Android IDL definitions to supply as imports.
These files will be made available as imports for any
@@ -158,11 +167,34 @@ public final class AndroidLibraryBaseRule implements RuleDefinition {
See the description of idl_import_root
for information about what this means.
*/
- .add(attr("idl_parcelables", LABEL_LIST)
- .direct_compile_time_input()
- .allowedFileTypes(AndroidRuleClasses.ANDROID_IDL))
- .add(attr("$android_manifest_merge_tool", LABEL).cfg(HOST).exec().value(
- env.getToolsLabel(AndroidRuleClasses.MANIFEST_MERGE_TOOL_LABEL)))
+ .add(
+ attr("idl_parcelables", LABEL_LIST)
+ .direct_compile_time_input()
+ .allowedFileTypes(AndroidRuleClasses.ANDROID_IDL))
+ /*
+ List of preprocessed Android IDL definitions to supply as imports.
+ These files will be made available as imports for any
+ android_library
target that depends on this library, directly
+ or via its transitive closure, but will not be translated to Java
+ or compiled.
+ Only preprocessed .aidl
files that correspond directly to
+ .java
sources in this library should be included (e.g., custom
+ implementations of Parcelable), otherwise use idl_srcs
for
+ Android IDL definitions that need to be translated to Java interfaces and
+ use idl_parcelable
+ for non-preprcessed AIDL files.
+