# ExternalNativeBuild

# ExternalNativeBuild

```
interface ExternalNativeBuild
```

|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [com.android.build.api.variant.ExternalNativeBuild](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/ExternalNativeBuild#) |

|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Known Direct Subclasses [ExternalNdkBuild](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/ExternalNdkBuild) |---------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------| | [ExternalNdkBuild](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/ExternalNdkBuild) | Interface for ndk-build per-variant info. | |

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](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.

## Summary

|                                                                                                                                                                                                                           ### Properties                                                                                                                                                                                                                            ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| abstract[SetProperty](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/SetProperty.html)\<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)\>   | [abiFilters](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/ExternalNativeBuild#abiFilters:org.gradle.api.provider.SetProperty) Specifies the Application Binary Interfaces (ABI) that Gradle should build outputs for.  |
| abstract[ListProperty](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/ListProperty.html)\<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)\> | [arguments](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/ExternalNativeBuild#arguments:org.gradle.api.provider.ListProperty) Specifies arguments for CMake.                                                            |
| abstract[ListProperty](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/ListProperty.html)\<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)\> | [cFlags](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/ExternalNativeBuild#cFlags:org.gradle.api.provider.ListProperty) Specifies flags for the C compiler.                                                             |
| abstract[ListProperty](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/ListProperty.html)\<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)\> | [cppFlags](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/ExternalNativeBuild#cppFlags:org.gradle.api.provider.ListProperty) Specifies flags for the CPP compiler.                                                       |
| abstract[SetProperty](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/SetProperty.html)\<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)\>   | [targets](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/variant/ExternalNativeBuild#targets:org.gradle.api.provider.SetProperty) 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}  

### arguments

```
abstract val arguments: ListProperty<String>
```

Specifies arguments for CMake.  

### cFlags

```
abstract val cFlags: ListProperty<String>
```

Specifies flags for the C compiler.  

### 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.