prebuilt_native_library()
prebuilt_native_library() rule is used to bundle native libraries (i.e., .so files) for Android.Arguments
name(required) #The short name for this build target.
native_libs(defaults toNone) #Path to a directory containing native libraries. This directory has subdirectories for different architectures, such as
armeabiandarmeabi-v7a.is_asset(defaults toFalse) #Normally native shared objects end up in a directory in the root of the APK named
lib/. If this parameter is set toTrue, then these objects are placed inassets/lib/. Placing shared objects in a non-standard location prevents Android from extracting them to the device's internal storage.visibility(defaults to[]) #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
depsorexported_depsattributes. For more information, see visibility.licenses(defaults to[]) #Set of license files for this library. To get the list of license files for a given build rule and all of its dependencies, you can use
buck query.labels(defaults to[]) #Set of arbitrary strings which allow you to annotate a build rule with tags that can be searched for over an entire dependency tree using
buck query attrfilter().
Examples
Most of the time, aprebuilt_native_library is private to the android_library that uses it:
prebuilt_native_library(
name = 'native_libs',
native_libs = 'libs',
)
android_library(
name = 'my_lib',
srcs = glob(['*.java']),
deps = [
':native_libs',
],
)