org.gradle.nativebinaries

## Interface NativeBinary

- All Superinterfaces:
    Binary, Buildable, BuildableModelElement, Named
  All Known Subinterfaces:
    ExecutableBinary, LibraryBinary, SharedLibraryBinary, StaticLibraryBinary

      @Incubating
      public interface NativeBinary
      extends Binary

  Represents a particular 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.
    `NativeComponent` | `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.
    `File` | `getOutputFile()` The file where this binary will be created.
    `DomainObjectSet<LanguageSourceSet>` | `getSource()` The source sets used to compile 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.
    `boolean` | `isBuildable()` Can this binary be built in the current environment?
    `void` | `lib(Object library)` Adds a library as input to this binary.
    `void` | `setOutputFile(File outputFile)` Sets the file where this binary will be created.
    `void` | `source(Object source)` Adds one or more `LanguageSourceSet`s that are used to compile this binary.

    - ### Methods inherited from interface org.gradle.language.base.BuildableModelElement

      `builtBy, setLifecycleTask`

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

      `getBuildDependencies`

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

      `getName`

- - ### Method Detail

    - #### getComponent

          NativeComponent getComponent()

      The component that this binary was built from.

    - #### getFlavor

          Flavor getFlavor()

      The flavor that this binary was built with.

    - #### getOutputFile

          File getOutputFile()

      The file where this binary will be created.

    - #### setOutputFile

          void setOutputFile(File outputFile)

      Sets the file where this binary will be created.

    - #### getSource

          DomainObjectSet<LanguageSourceSet> getSource()

      The source sets used to compile this binary.

    - #### source

          void source(Object source)

      Adds one or more `LanguageSourceSet`s that are used to compile this binary.

      This method accepts the following types:
      - A `FunctionalSourceSet`
      - A `LanguageSourceSet`
      - A Collection of `LanguageSourceSet`s

    - #### getToolChain

          ToolChain getToolChain()

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

    - #### 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 `Library`
      - A `LibraryBinary`
      - A `NativeDependencySet`

    - #### getLinker

          Tool getLinker()

      The settings used for linking this binary.

    - #### getTasks

          NativeBinaryTasks getTasks()

      The set of tasks associated with this binary.

    - #### isBuildable

          boolean isBuildable()

      Can this binary be built in the current environment?