org.gradle.nativeplatform

## Interface NativeBinarySpec

- All Superinterfaces:
    BinarySpec, Buildable, BuildableModelElement, 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

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `BuildType` | `getBuildType()` Returns the `BuildType` used to construct this binary.
    `NativeComponentSpec` | `getComponent()` The component that this binary was built from.
    `Flavor` | `getFlavor()` The flavor that this binary was built with.
    `Collection<NativeDependencySet>` | `getLibs()` The libraries that should be linked into this binary.
    `Tool` | `getLinker()` The settings used for linking this binary.
    `Tool` | `getStaticLibArchiver()` The static archiver settings used for 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(Object library)` Adds a library as input to this binary.

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

      `getDisplayName, getInputs, getSource, getSources, getTasks, isBuildable, sources, tasks`

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

      `builtBy, getBuildTask, hasBuildDependencies, setBuildTask`

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

      `getBuildDependencies`

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

      `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

          Collection<NativeDependencySet> getLibs()

      The libraries that should be linked into this binary.

    - #### lib

          void lib(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 settings used for linking this binary.

    - #### getStaticLibArchiver

          Tool getStaticLibArchiver()

      The static archiver settings used for creating this binary.