android_aar()rule is used to generate an Android AAR.
See the official Android documentation for details about the
The name of the rule.
The skeleton manifest file used to generate the final
AndroidManifest.xml. May either be a file or a
See the documentation on the values argument for
Whether to include the
BuildConfigclass files in the final .aar file. Needs to be set to
Trueif any build_config_values are specified. This is normally only needed if the build tool that is consuming the .aar file does not generate
BuildConfigclasses. Note: the AAR format does not specify a way to pass defaults that should be injected into the final
BuildConfigclass, therefore that information might need to be replicated manually in the build that's consuming the .aar file.
List of build targets whose corresponding compiled Java code, Android resources, and native libraries will be included in the AAR along with their transitive dependencies. For compile time deps which should not be included in the final AAR, use
android_library()Will be included in the final
android_resource()Will be included in the final
android_build_config()Will be included in the final
groovy_library()Will be included in the final
java_library()Will be included in the final
prebuilt_jar()Will be included in the final
ndk_library()Will be included in the final
prebuilt_native_library()Will be included in the final
List of build target patterns that identify the build rules that can include this rule as a dependency, for example, by listing it in their
exported_depsattributes. For more information, see visibility.
android_resource( name = 'res', res = 'res', assets = 'assets', package = 'com.example', ) android_library( name = 'lib', srcs = glob(['**/*.java']), ) android_aar( name = 'app', manifest_skeleton = 'AndroidManifestSkeleton.xml', deps = [ ':res', ':lib', ], )