NativeBinarySpec (Gradle API 2.9)
Date: 2015-11-17

Package: org.gradle.nativeplatform

## [Java] Interface NativeBinarySpec

- org.gradle.api.Buildable

- All Superinterfaces:
    BinarySpec, Buildable

  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.
    `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.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `interface BinarySpec` | `getDisplayName, getInputs, getSource, getSources, getTasks, isBuildable, sources, tasks`
    `interface BuildableModelElement` | `builtBy, getBuildTask, setBuildTask, hasBuildDependencies, getBuildDependencies`
    `interface Named` | `getName`

- - ### Method Detail

    - #### @Variant public BuildType getBuildType()

      Returns the BuildType used to construct this binary.

    - #### public NativeComponentSpec getComponent()

      The component that this binary was built from.

    - #### @Variant 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.

    - #### @Variant public NativePlatform getTargetPlatform()

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

    - #### public NativeToolChain getToolChain()

      Returns the NativeToolChain 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')