Package: org.gradle.nativebinaries

## [Java] Interface NativeBinarySpec

- Named

- All Superinterfaces:
    BinarySpec, BuildableModelElement, Named

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

- - ### Methods Summary

    Methods
    Type | Name 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.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `interface BinarySpec` | `getDisplayName, getSource, getTasks, isBuildable, source`

- - ### Method Detail

    - #### public BuildType getBuildType()

      Returns the BuildType used to construct this binary.

    - #### public NativeComponentSpec getComponent()

      The component that this binary was built from.

    - #### public Flavor getFlavor()

      The flavor that this binary was built with.

    - #### public Collection<NativeDependencySet> getLibs()

      The libraries that should be linked into this binary.

    - #### public Tool getLinker()

      The settings used for linking this binary.

    - #### public Tool getStaticLibArchiver()

      The static archiver settings used for creating this binary.

    - #### public Platform getTargetPlatform()

      Returns the Platform that this binary is targeted to run on.

    - #### public NativeBinaryTasks getTasks()

      The set of tasks associated with this binary.

    - #### public ToolChain getToolChain()

      Returns the ToolChain that will be used to build this binary.

    - #### public 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')