Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD

## org.gradle.nativebinaries
[Java] Interface NativeBinary

    org.gradle.api.Buildable
      org.gradle.language.base.Binary
          org.gradle.nativebinaries.NativeBinary
              org.gradle.api.Named
                  org.gradle.language.base.BuildableModelElement

All Superinterfaces:
  Buildable, Binary, Named, BuildableModelElement

    @Incubating
    @HasInternalProtocol
    public interface NativeBinary
    extends Binary

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

Method Summary
`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` | `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` | `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 LanguageSourceSets that are used to compile this binary.

Methods inherited from interface Named
getName

Methods inherited from interface BuildableModelElement
builtBy, setLifecycleTask

Methods inherited from interface Buildable
getBuildDependencies

Method Detail

### getBuildType

    public BuildType getBuildType()

  Returns the BuildType used to construct this binary.

### getComponent

    public NativeComponent getComponent()

  The component that this binary was built from.

### getFlavor

    public Flavor getFlavor()

  The flavor that this binary was built with.

### getLibs

    public Collection getLibs()

  The libraries that should be linked into this binary.

### getLinker

    public Tool getLinker()

  The settings used for linking this binary.

### getOutputFile

    public File getOutputFile()

  The file where this binary will be created.

### getSource

    public DomainObjectSet getSource()

  The source sets used to compile this binary.

### getTargetPlatform

    public Platform getTargetPlatform()

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

### getTasks

    public NativeBinaryTasks getTasks()

  The set of tasks associated with this binary.

### getToolChain

    public ToolChain getToolChain()

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

### isBuildable

    public boolean isBuildable()

  Can this binary be built in the current environment?

### lib

    public void lib(Object library)

  Adds a library as input to this binary.

  This method accepts the following types:
  - A Library
  - A LibraryBinary
  - A NativeDependencySet

### setOutputFile

    public void setOutputFile(File outputFile)

  Sets the file where this binary will be created.

### source

    public void source(Object source)

  Adds one or more LanguageSourceSets that are used to compile this binary.

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

Gradle API 1.10