Stay organized with collections
Save and categorize content based on your preferences.
ExternalNativeBuild
interface ExternalNativeBuild
Parameters to use when building native components.
Warning: Due to current limitations in how Android Gradle Plugin and native build interacts, it is not possible to wire a org.gradle.api.Task
mapped org.gradle.api.provider.Provider
to any of the collection ListProperty
or SetProperty
below. These properties must be resolved at configuration time and therefore cannot have results based on Task execution. This limitation might be lifted in the future.
Summary
Public properties
abiFilters
val abiFilters: SetProperty<String>
Specifies the Application Binary Interfaces (ABI) that Gradle should build outputs for. The ABIs that Gradle packages into your APK are determined by {@link com.android.build.gradle.internal.dsl.NdkOptions#abiFilter android.defaultConfig.ndk.abiFilter}
targets
val targets: SetProperty<String>
Specifies the library and executable targets from your CMake project that Gradle should build.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# ExternalNativeBuild\n===================\n\n\n```\ninterface ExternalNativeBuild\n```\n\n\u003cbr /\u003e\n\nKnown direct subclasses \n[ExternalNdkBuild](/reference/tools/gradle-api/7.3/com/android/build/api/variant/ExternalNdkBuild) \n\n|----------------------------------------------------------------------------------------------------|-------------------------------------------|\n| [ExternalNdkBuild](/reference/tools/gradle-api/7.3/com/android/build/api/variant/ExternalNdkBuild) | Interface for ndk-build per-variant info. |\n\n*** ** * ** ***\n\nParameters to use when building native components.\n\nWarning: Due to current limitations in how Android Gradle Plugin and native build interacts, it is not possible to wire a [org.gradle.api.Task](https://docs.gradle.org/current/javadoc/org/gradle/api/Task.html) mapped [org.gradle.api.provider.Provider](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Provider.html) to any of the collection [ListProperty](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/ListProperty.html) or [SetProperty](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/SetProperty.html) below. These properties must be resolved at configuration time and therefore cannot have results based on Task execution. This limitation might be lifted in the future.\n\nSummary\n-------\n\n| ### Public properties ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [SetProperty](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/SetProperty.html)`\u003c`[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`\u003e` | [abiFilters](/reference/tools/gradle-api/7.3/com/android/build/api/variant/ExternalNativeBuild#abiFilters()) Specifies the Application Binary Interfaces (ABI) that Gradle should build outputs for. |\n| [ListProperty](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/ListProperty.html)`\u003c`[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`\u003e` | [arguments](/reference/tools/gradle-api/7.3/com/android/build/api/variant/ExternalNativeBuild#arguments()) Specifies arguments for CMake. |\n| [ListProperty](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/ListProperty.html)`\u003c`[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`\u003e` | [cFlags](/reference/tools/gradle-api/7.3/com/android/build/api/variant/ExternalNativeBuild#cFlags()) Specifies flags for the C compiler. |\n| [ListProperty](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/ListProperty.html)`\u003c`[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`\u003e` | [cppFlags](/reference/tools/gradle-api/7.3/com/android/build/api/variant/ExternalNativeBuild#cppFlags()) Specifies flags for the CPP compiler. |\n| [SetProperty](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/SetProperty.html)`\u003c`[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`\u003e` | [targets](/reference/tools/gradle-api/7.3/com/android/build/api/variant/ExternalNativeBuild#targets()) Specifies the library and executable targets from your CMake project that Gradle should build. |\n\nPublic properties\n-----------------\n\n### abiFilters\n\n```\nval abiFilters: SetProperty\u003cString\u003e\n```\n\nSpecifies the Application Binary Interfaces (ABI) that Gradle should build outputs for. The ABIs that Gradle packages into your APK are determined by {@link com.android.build.gradle.internal.dsl.NdkOptions#abiFilter android.defaultConfig.ndk.abiFilter} \n\n### arguments\n\n```\nval arguments: ListProperty\u003cString\u003e\n```\n\nSpecifies arguments for CMake. \n\n### cFlags\n\n```\nval cFlags: ListProperty\u003cString\u003e\n```\n\nSpecifies flags for the C compiler. \n\n### cppFlags\n\n```\nval cppFlags: ListProperty\u003cString\u003e\n```\n\nSpecifies flags for the CPP compiler. \n\n### targets\n\n```\nval targets: SetProperty\u003cString\u003e\n```\n\nSpecifies the library and executable targets from your CMake project that Gradle should build."]]