DSL object for per-variant ndk-build configurations.
Property | Description |
abiFilters | Per-variant ABIs Gradle should build, independently of the ones
it packages into your APK. In most cases, you only need to specify your desired ABIs using
|
arguments | Per-variant arguments for ndk-build settings also available to your Android.mk and Application.mk scripts. |
cFlags | Per-variant flags for the C compiler. |
cppFlags | Per-variant flags for the C++ compiler. |
targets | Per-variant target libraries from your ndk-build project that Gradle should build and package into your APK. |
Per-variant ABIs Gradle should build, independently of the ones
it packages into your APK. In most cases, you only need to specify your desired ABIs using
NdkOptions.abiFilter()
,
which controls which ABIs Gradle builds and packages into your APK.
Per-variant arguments for ndk-build settings also available to your Android.mk and Application.mk scripts.
For example:
arguments "NDK_APPLICATION_MK:=Application.mk"
Per-variant flags for the C compiler.
For example:
cFlags "-D_EXAMPLE_C_FLAG1", "-D_EXAMPLE_C_FLAG2"
Per-variant flags for the C++ compiler.
For example:
cppFlags "-DTEST_CPP_FLAG1", "-DTEST_CPP_FLAG2"
Per-variant target libraries from your ndk-build project that Gradle should build and package into your APK.
For example, if your ndk-build project defines two
libraries, libexample-one.so
and libexample-two.so
, you can tell
Gradle to only build and package libexample-one.so
with the following:
targets "example-one"
When this property is not configured, Gradle builds and packages all available shared object targets.