# NativeLibrarySpec

@Incubating
interface NativeLibrarySpec : LibrarySpec, NativeComponentSpec, TargetedNativeComponent(source)

### Deprecated

The Gradle software model is deprecated and will be removed in Gradle 10. Use the new component model (e.g. `cpp-application`, `cpp-library`, `swift-application`, `swift-library`, `xctest`) instead.

Definition of a native library component that is to be built by Gradle.

#### Since

2.2

## Functions

getApi
Link copied to clipboard
abstract fun getApi(): NativeLibraryRequirement
Converts this library to a native library requirement that uses the api library linkage.
getBaseName
Link copied to clipboard
abstract fun getBaseName(): String
The name that is used to construct the output file names when building this component.
getBinaries
Link copied to clipboard
abstract fun getBinaries(): ModelMap<BinarySpec>
The variants produced for this component spec.
getDisplayName
Link copied to clipboard
abstract fun getDisplayName(): String
Returns a human-consumable display name for this element.
getName
Link copied to clipboard
abstract fun getName(): String
Returns the name of this element.
getProjectPath
Link copied to clipboard
abstract fun getProjectPath(): String
The path to the project containing this component.
getShared
Link copied to clipboard
abstract fun getShared(): NativeLibraryRequirement
Converts this library to a native library requirement that uses the shared library variant.
getSources
Link copied to clipboard
abstract fun getSources(): ModelMap<LanguageSourceSet>
The source sets for this component.
getStatic
Link copied to clipboard
abstract fun getStatic(): NativeLibraryRequirement
Converts this library to a native library requirement that uses the static library variant.
getVariants
Link copied to clipboard
abstract fun getVariants(): Iterable<out Binary>
The variants of this component.
setBaseName
Link copied to clipboard
abstract fun setBaseName(baseName: String)
Sets the name that is used to construct the output file names when building this component.
targetBuildTypes
Link copied to clipboard
abstract fun targetBuildTypes(buildTypeSelectors: Array<String>)
Specifies the names of one or more BuildTypes that this component should be built for.
targetFlavors
Link copied to clipboard
abstract fun targetFlavors(flavorSelectors: Array<String>)
Specifies the names of one or more Flavors that this component should be built for.
targetPlatform
Link copied to clipboard
abstract fun targetPlatform(targetPlatform: String)
Specifies a platform that this component should be built be for.