# NativeExecutableBinarySpec

@Incubating
interface NativeExecutableBinarySpec : NativeBinarySpec, ApplicationBinarySpec(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.

An binary built by Gradle for a native application.

## Types

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

## Functions

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.
getApplication
Link copied to clipboard
abstract fun getApplication(): NativeExecutableSpec
The application that this binary belongs to.
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(): NativeExecutableSpec
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.
getExecutable
Link copied to clipboard
abstract fun getExecutable(): NativeExecutableFileSpec
Native Executable File.
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.
getInstallation
Link copied to clipboard
abstract fun getInstallation(): NativeInstallationSpec
Native Installation location for a native executable.
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.
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(): NativeExecutableBinarySpec.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
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.