api / org.gradle.nativeplatform / NativeExecutableBinarySpec

NativeExecutableBinarySpec

@Incubating interface NativeExecutableBinarySpec : NativeBinarySpec, ApplicationBinarySpec

An binary built by Gradle for a native application.

Types

TasksCollection

interface TasksCollection : BinaryTasksCollection

Provides access to key tasks used for building the binary.

Functions

getApplication

abstract fun getApplication(): NativeExecutableSpec

{@inheritDoc}

getComponent

abstract fun getComponent(): NativeExecutableSpec

{@inheritDoc}

getExecutable

abstract fun getExecutable(): NativeExecutableFileSpec

Native Executable File.

getInstallation

abstract fun getInstallation(): NativeInstallationSpec

Native Installation location for a native executable.

getTasks

abstract fun getTasks(): TasksCollection

{@inheritDoc}

Inherited Functions

getAssembler

abstract fun getAssembler(): Tool

The configuration of the assembler used when compiling assembly sources this binary. Valid for SharedLibraryBinarySpec, StaticLibraryBinarySpec and NativeExecutableBinarySpec when the 'assembler' plugin is applied.

getBuildType

abstract fun getBuildType(): BuildType

Returns the org.gradle.nativeplatform.BuildType used to construct this binary.

getCppCompiler

abstract fun getCppCompiler(): PreprocessingTool

The configuration of the C++ compiler used when compiling C++ sources for this binary. Valid for SharedLibraryBinarySpec, StaticLibraryBinarySpec and NativeExecutableBinarySpec when the 'cpp' plugin is applied.

getFlavor

abstract fun getFlavor(): Flavor

The org.gradle.nativeplatform.Flavor that this binary was built with.

getLibs

abstract fun getLibs(): MutableCollection<NativeDependencySet>

The libraries that should be linked into this binary.

getLinker

abstract fun getLinker(): Tool

The configuration of the linker used when linking this binary. Valid for SharedLibraryBinarySpec and NativeExecutableBinarySpec.

getObjcCompiler

abstract fun getObjcCompiler(): PreprocessingTool

The configuration of the Objective-C compiler used when compiling Objective-C sources for this binary. Valid for SharedLibraryBinarySpec, StaticLibraryBinarySpec and NativeExecutableBinarySpec when the 'objective-c' plugin is applied.

getObjcppCompiler

abstract fun getObjcppCompiler(): PreprocessingTool

The configuration of the Objective-C++ compiler used when compiling Objective-C++ sources for this binary. Valid for SharedLibraryBinarySpec, StaticLibraryBinarySpec and NativeExecutableBinarySpec when the 'objective-cpp' plugin is applied.

getRcCompiler

abstract fun getRcCompiler(): PreprocessingTool

The configuration of the Resource compiler used when compiling resources for this binary. Valid for SharedLibraryBinarySpec, StaticLibraryBinarySpec and NativeExecutableBinarySpec when the 'windows-resources' plugin is applied.

getStaticLibArchiver

abstract fun getStaticLibArchiver(): Tool

The configuration of the static library archiver used when creating this binary. Valid for StaticLibraryBinarySpec.

getTargetPlatform

abstract fun getTargetPlatform(): NativePlatform

Returns the org.gradle.nativeplatform.platform.NativePlatform that this binary is targeted to run on.

getToolChain

abstract fun getToolChain(): NativeToolChain

Returns the org.gradle.nativeplatform.toolchain.NativeToolChain that will be used to build this binary.

getcCompiler

abstract fun getcCompiler(): PreprocessingTool

The configuration of the C compiler used when compiling C sources for this binary. Valid for SharedLibraryBinarySpec, StaticLibraryBinarySpec and NativeExecutableBinarySpec when the 'c' plugin is applied.

lib

abstract fun lib(library: Any): Unit

Adds a library as input to this binary.

This method accepts the following types:

  • A NativeLibrarySpec
  • A NativeDependencySet
  • A java.util.Map containing the library selector.
The Map notation supports the following String attributes:
  • project: the path to the project containing the library (optional, defaults to current project)
  • library: the name of the library (required)
  • linkage: the library linkage required ['shared'/'static'] (optional, defaults to 'shared')