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
Properties
|
abstract SetProperty<String> |
Specifies the Application Binary Interfaces (ABI) that Gradle should build outputs for.
|
abstract ListProperty<String> |
Specifies arguments for CMake.
|
abstract ListProperty<String> |
Specifies flags for the C compiler.
|
abstract ListProperty<String> |
Specifies flags for the CPP compiler.
|
abstract SetProperty<String> |
Specifies the library and executable targets from your CMake project that Gradle should
build.
|
Properties
abiFilters
abstract 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}
cppFlags
abstract val cppFlags: ListProperty<String>
Specifies flags for the CPP compiler.
targets
abstract 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```\ninterface ExternalNativeBuild\n```\n\n|--------------------------------------------------------|\n| [com.android.build.api.variant.ExternalNativeBuild](#) |\n\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [ExternalNdkBuild](/reference/tools/gradle-api/7.1/com/android/build/api/variant/ExternalNdkBuild) |----------------------------------------------------------------------------------------------------|-------------------------------------------| | [ExternalNdkBuild](/reference/tools/gradle-api/7.1/com/android/build/api/variant/ExternalNdkBuild) | Interface for ndk-build per-variant info. | |\n\nParameters to use when building native components.\n\nWarning: Due to current limitations in how Android Gradle Plugin and native build interacts,\nit 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\nany 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\nconfiguration time and therefore cannot have results based on Task execution. This limitation\nmight be lifted in the future.\n\nSummary\n-------\n\n| ### Properties ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [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](#abiFilters:org.gradle.api.provider.SetProperty) Specifies the Application Binary Interfaces (ABI) that Gradle should build outputs for. |\n| abstract [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](#arguments:org.gradle.api.provider.ListProperty) Specifies arguments for CMake. |\n| abstract [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](#cFlags:org.gradle.api.provider.ListProperty) Specifies flags for the C compiler. |\n| abstract [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](#cppFlags:org.gradle.api.provider.ListProperty) Specifies flags for the CPP compiler. |\n| abstract [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](#targets:org.gradle.api.provider.SetProperty) Specifies the library and executable targets from your CMake project that Gradle should build. |\n\nProperties\n----------\n\n### abiFilters\n\n```\nabstract val abiFilters: SetProperty\u003cString\u003e\n```\n\nSpecifies the Application Binary Interfaces (ABI) that Gradle should build outputs for. The\nABIs that Gradle packages into your APK are determined by {@link\ncom.android.build.gradle.internal.dsl.NdkOptions#abiFilter\nandroid.defaultConfig.ndk.abiFilter} \n\n### arguments\n\n```\nabstract val arguments: ListProperty\u003cString\u003e\n```\n\nSpecifies arguments for CMake. \n\n### cFlags\n\n```\nabstract val cFlags: ListProperty\u003cString\u003e\n```\n\nSpecifies flags for the C compiler. \n\n### cppFlags\n\n```\nabstract val cppFlags: ListProperty\u003cString\u003e\n```\n\nSpecifies flags for the CPP compiler. \n\n### targets\n\n```\nabstract val targets: SetProperty\u003cString\u003e\n```\n\nSpecifies the library and executable targets from your CMake project that Gradle should\nbuild."]]