org.gradle.nativebinaries

## Interface NativeBinarySpec

- All Superinterfaces:
    BinarySpec, Buildable, BuildableModelElement, Named
  All Known Subinterfaces:
    CUnitTestSuiteBinarySpec, 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.
    `Platform` | `getTargetPlatform()` Returns the `Platform` that this binary is targeted to run on.
    `NativeBinaryTasks` | `getTasks()` The set of tasks associated with this binary.
    `ToolChain` | `getToolChain()` Returns the `ToolChain` 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.runtime.base.BinarySpec

      `getDisplayName, getSource, isBuildable, source`

    - ### 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

          Platform getTargetPlatform()

      Returns the `Platform` 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

          ToolChain getToolChain()

      Returns the `ToolChain` 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.

    - #### getTasks

          NativeBinaryTasks getTasks()

      The set of tasks associated with this binary.
      Specified by:
        `getTasks` in interface `BinarySpec`