# StaticLibraryBinarySpec

@Incubating
interface StaticLibraryBinarySpec : NativeLibraryBinarySpec(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.

A static library binary built by Gradle for a native library.

#### Since

2.2

## Types

TasksCollection
Link copied to clipboard
interface TasksCollection : BinaryTasksCollection
Provides access to key tasks used for building the binary.

## Functions

additionalLinkFiles
Link copied to clipboard
abstract fun additionalLinkFiles(files: FileCollection)
Add some additional files required by consumers of this library at link time.
builtBy
Link copied to clipboard
abstract fun builtBy(tasks: Array<Any>)
Adds tasks required to build this component.
checkedBy
Link copied to clipboard
abstract fun checkedBy(tasks: Array<Any>)
Adds tasks required to check this component.
getAssembler
Link copied to clipboard
abstract fun getAssembler(): Tool
The configuration of the assembler used when compiling assembly sources this binary.
getBuildDependencies
Link copied to clipboard
abstract fun getBuildDependencies(): TaskDependency
Returns a dependency which contains the tasks which build this artifact.
getBuildTask
Link copied to clipboard
@Nullable
abstract fun getBuildTask(): @Nullable Task
Returns the task responsible for building this component.
getBuildType
Link copied to clipboard
abstract fun getBuildType(): BuildType
Returns the org.gradle.nativeplatform.BuildType used to construct this binary.
getcCompiler
Link copied to clipboard
abstract fun getcCompiler(): PreprocessingTool
The configuration of the C compiler used when compiling C sources for this binary.
getCheckTask
Link copied to clipboard
@Nullable
abstract fun getCheckTask(): @Nullable Task
Returns the task responsible for checking this component.
getComponent
Link copied to clipboard
abstract fun getComponent(): NativeComponentSpec
abstract fun getComponent(): NativeLibrarySpec
The component that this binary was built from.
getCppCompiler
Link copied to clipboard
abstract fun getCppCompiler(): PreprocessingTool
The configuration of the C++ compiler used when compiling C++ sources for this binary.
getDisplayName
Link copied to clipboard
abstract fun getDisplayName(): String
Returns a human-consumable display name for this binary.
getFlavor
Link copied to clipboard
abstract fun getFlavor(): Flavor
The org.gradle.nativeplatform.Flavor that this binary was built with.
getInputs
Link copied to clipboard
abstract fun getInputs(): DomainObjectSet<LanguageSourceSet>
Returns all inputs of the binary.
getLibrary
Link copied to clipboard
abstract fun getLibrary(): NativeLibrarySpec
abstract fun getLibrary(): LibrarySpec
The library that this binary belongs to.
getLibs
Link copied to clipboard
abstract fun getLibs(): Collection<NativeDependencySet>
The libraries that should be linked into this binary.
getLinker
Link copied to clipboard
abstract fun getLinker(): Tool
The configuration of the linker used when linking this binary.
getName
Link copied to clipboard
abstract fun getName(): String
Returns the name of this element.
getObjcCompiler
Link copied to clipboard
abstract fun getObjcCompiler(): PreprocessingTool
The configuration of the Objective-C compiler used when compiling Objective-C sources for this binary.
getObjcppCompiler
Link copied to clipboard
abstract fun getObjcppCompiler(): PreprocessingTool
The configuration of the Objective-C++ compiler used when compiling Objective-C++ sources for this binary.
getProjectPath
Link copied to clipboard
abstract fun getProjectPath(): String
The path to the project containing this component.
getRcCompiler
Link copied to clipboard
abstract fun getRcCompiler(): PreprocessingTool
The configuration of the Resource compiler used when compiling resources for this binary.
getSources
Link copied to clipboard
abstract fun getSources(): ModelMap<LanguageSourceSet>
The sources owned by this binary.
getStaticLibArchiver
Link copied to clipboard
abstract fun getStaticLibArchiver(): Tool
The configuration of the static library archiver used when creating this binary.
getStaticLibraryFile
Link copied to clipboard
abstract fun getStaticLibraryFile(): File
The static library file.
getTargetPlatform
Link copied to clipboard
abstract fun getTargetPlatform(): NativePlatform
Returns the org.gradle.nativeplatform.platform.NativePlatform that this binary is targeted to run on.
getTasks
Link copied to clipboard
abstract fun getTasks(): StaticLibraryBinarySpec.TasksCollection
The set of tasks associated with this binary.
getToolChain
Link copied to clipboard
abstract fun getToolChain(): NativeToolChain
Returns the org.gradle.nativeplatform.toolchain.NativeToolChain that will be used to build this binary.
hasBuildDependencies
Link copied to clipboard
abstract fun hasBuildDependencies(): Boolean
Returns whether build dependencies.
isBuildable
Link copied to clipboard
abstract fun isBuildable(): Boolean
Can this binary be built in the current environment?
lib
Link copied to clipboard
abstract fun lib(library: Any)
Adds a library as input to this binary.
setBuildTask
Link copied to clipboard
abstract fun setBuildTask(@Nullable buildTask: @Nullable Task)
Specifies the task responsible for building this component.
setCheckTask
Link copied to clipboard
abstract fun setCheckTask(@Nullable checkTask: @Nullable Task)
Specifies the task responsible for checking this component.
setStaticLibraryFile
Link copied to clipboard
abstract fun setStaticLibraryFile(staticLibraryFile: File)
The static library binary file.