Package org.gradle.nativeplatform

## Interface NativeBinarySpec

- All Superinterfaces:
    `Binary`, `BinarySpec`, `Buildable`, `BuildableComponentSpec`, `CheckableComponentSpec`, `ComponentSpec`, `ModelElement`, `Named`
  All Known Subinterfaces:
    `CUnitTestSuiteBinarySpec`, `GoogleTestTestSuiteBinarySpec`, `NativeExecutableBinarySpec`, `NativeLibraryBinarySpec`, `NativeTestSuiteBinarySpec`, `SharedLibraryBinarySpec`, `StaticLibraryBinarySpec`

      @Incubating
      public interface NativeBinarySpec
      extends BinarySpec

  Represents a binary artifact that is the result of building a native component.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.gradle.api.Named

      `Named.Namer`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Tool` | `getAssembler()` | The configuration of the assembler used when compiling assembly sources this binary.
    `BuildType` | `getBuildType()` | Returns the `BuildType` used to construct this binary.
    `PreprocessingTool` | `getcCompiler()` | The configuration of the C compiler used when compiling C sources for this binary.
    `NativeComponentSpec` | `getComponent()` | The component that this binary was built from.
    `PreprocessingTool` | `getCppCompiler()` | The configuration of the C++ compiler used when compiling C++ sources for this binary.
    `Flavor` | `getFlavor()` | The `Flavor` that this binary was built with.
    `java.util.Collection<NativeDependencySet>` | `getLibs()` | The libraries that should be linked into this binary.
    `Tool` | `getLinker()` | The configuration of the linker used when linking this binary.
    `PreprocessingTool` | `getObjcCompiler()` | The configuration of the Objective-C compiler used when compiling Objective-C sources for this binary.
    `PreprocessingTool` | `getObjcppCompiler()` | The configuration of the Objective-C++ compiler used when compiling Objective-C++ sources for this binary.
    `PreprocessingTool` | `getRcCompiler()` | The configuration of the Resource compiler used when compiling resources for this binary.
    `Tool` | `getStaticLibArchiver()` | The configuration of the static library archiver used when creating this binary.
    `NativePlatform` | `getTargetPlatform()` | Returns the `NativePlatform` that this binary is targeted to run on.
    `NativeToolChain` | `getToolChain()` | Returns the `NativeToolChain` that will be used to build this binary.
    `void` | `lib​(java.lang.Object library)` | Adds a library as input to this binary.

    - ### Methods inherited from interface org.gradle.platform.base.Binary

      `getDisplayName`

    - ### Methods inherited from interface org.gradle.platform.base.BinarySpec

      `getInputs, getSources, getTasks, isBuildable`

    - ### Methods inherited from interface org.gradle.api.Buildable

      `getBuildDependencies`

    - ### Methods inherited from interface org.gradle.api.BuildableComponentSpec

      `builtBy, getBuildTask, hasBuildDependencies, setBuildTask`

    - ### Methods inherited from interface org.gradle.api.CheckableComponentSpec

      `checkedBy, getCheckTask, setCheckTask`

    - ### Methods inherited from interface org.gradle.platform.base.ComponentSpec

      `getProjectPath`

    - ### Methods inherited from interface org.gradle.model.ModelElement

      `getDisplayName, getName`

- - ### Method Detail

    - #### getComponent

          NativeComponentSpec getComponent()

      The component that this binary was built from.

    - #### getFlavor

          Flavor getFlavor()

      The `Flavor` that this binary was built with.

    - #### getTargetPlatform

          NativePlatform getTargetPlatform()

      Returns the `NativePlatform` that this binary is targeted to run on.

    - #### getBuildType

          BuildType getBuildType()

      Returns the `BuildType` used to construct this binary.

    - #### getLibs

          java.util.Collection<NativeDependencySet> getLibs()

      The libraries that should be linked into this binary.

    - #### lib

          void lib​(java.lang.Object library)

      Adds a library as input to this binary.

      This method accepts the following types:

      - A `NativeLibrarySpec`
      - A `NativeDependencySet`
      - A `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')

    - #### getToolChain

          NativeToolChain getToolChain()

      Returns the `NativeToolChain` that will be used to build this binary.

    - #### getLinker

          Tool getLinker()

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

    - #### getStaticLibArchiver

          Tool getStaticLibArchiver()

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

    - #### getAssembler

          Tool getAssembler()

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

    - #### getcCompiler

          PreprocessingTool getcCompiler()

      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.

    - #### getCppCompiler

          PreprocessingTool getCppCompiler()

      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.

    - #### getObjcCompiler

          PreprocessingTool getObjcCompiler()

      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

          PreprocessingTool getObjcppCompiler()

      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

          PreprocessingTool getRcCompiler()

      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.