android_prebuilt_aar()rule takes an
.aarfile and makes it available as an Android dependency. As expected, an
android_binarythat transitively depends on an
android_prebuilt_aar()will include its contents in the generated APK.
See the official Android documentation for details about the
The short name for this build target.
Path to the
.aarfile. This may also be a build target to a rule (such as a
genrule) whose output is an
Path to a JAR file that contains the
.javafiles to create the
aar. This is frequently provided for debugging purposes.
URL to the Javadoc for the
.classfiles in the
.aarfile contains native prebuilt
.solibraries and the Java code uses these libraries via a call to
System.loadLibrary(), then many optimizations—such as exopackage, compression, or asset packaging—may not be compatible with these prebuilt libs. Setting this parameter to
Truecauses all of these optimizations to skip the prebuilt
.sofiles originating from this
.sofiles will always be packaged directly into the main
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_prebuilt_aar( name = 'play-services', aar = 'play-services-4.0.30.aar', source_jar = 'play-services-4.0.30-sources.jar', javadoc_url = 'file:///opt/android-sdk/extras/google/google_play_services/docs/reference', ) android_library( name = 'lib', # This Java code can compile against Play services and reference its resources. srcs = glob(['*.java']), deps = [ ':play-services' ], )