# Interface NativeBinarySpec

All Superinterfaces:
  `Binary, BinarySpec, Buildable, BuildableComponentSpec, CheckableComponentSpec, ComponentSpec, ModelElement, Named`

All Known Subinterfaces:
  `CUnitTestSuiteBinarySpec, GoogleTestTestSuiteBinarySpec, NativeExecutableBinarySpec, NativeLibraryBinarySpec, NativeTestSuiteBinarySpec, SharedLibraryBinarySpec, StaticLibraryBinarySpec`

@Incubating @Deprecated public interface NativeBinarySpec extends BinarySpec
Deprecated.
The Gradle software model is deprecated and will be removed in Gradle 10. Use the new component model (e.g. `cpp-application`, `cpp-library`, `swift-application`, `swift-library`, `xctest`) instead.
Represents a binary artifact that is the result of building a native component.

Since:
  2.2

- ## Nested Class Summary

  ### Nested classes/interfaces inherited from interface Named

  `Named.Namer`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Tool`
  `getAssembler()`
  Deprecated.
  The configuration of the assembler used when compiling assembly sources this binary.
  `BuildType`
  `getBuildType()`
  Deprecated.
  Returns the `BuildType` used to construct this binary.
  `PreprocessingTool`
  `getcCompiler()`
  Deprecated.
  The configuration of the C compiler used when compiling C sources for this binary.
  `NativeComponentSpec`
  `getComponent()`
  Deprecated.
  The component that this binary was built from.
  `PreprocessingTool`
  `getCppCompiler()`
  Deprecated.
  The configuration of the C++ compiler used when compiling C++ sources for this binary.
  `Flavor`
  `getFlavor()`
  Deprecated.
  The `Flavor` that this binary was built with.
  `Collection<NativeDependencySet>`
  `getLibs()`
  Deprecated.
  The libraries that should be linked into this binary.
  `Tool`
  `getLinker()`
  Deprecated.
  The configuration of the linker used when linking this binary.
  `PreprocessingTool`
  `getObjcCompiler()`
  Deprecated.
  The configuration of the Objective-C compiler used when compiling Objective-C sources for this binary.
  `PreprocessingTool`
  `getObjcppCompiler()`
  Deprecated.
  The configuration of the Objective-C++ compiler used when compiling Objective-C++ sources for this binary.
  `PreprocessingTool`
  `getRcCompiler()`
  Deprecated.
  The configuration of the Resource compiler used when compiling resources for this binary.
  `Tool`
  `getStaticLibArchiver()`
  Deprecated.
  The configuration of the static library archiver used when creating this binary.
  `NativePlatform`
  `getTargetPlatform()`
  Deprecated.
  Returns the `NativePlatform` that this binary is targeted to run on.
  `NativeToolChain`
  `getToolChain()`
  Deprecated.
  Returns the `NativeToolChain` that will be used to build this binary.
  `void`
  `lib(Object library)`
  Deprecated.
  Adds a library as input to this binary.

  ### Methods inherited from interface Binary

  `getDisplayName`

  ### Methods inherited from interface BinarySpec

  `getInputs, getSources, getTasks, isBuildable`

  ### Methods inherited from interface Buildable

  `getBuildDependencies`

  ### Methods inherited from interface BuildableComponentSpec

  `builtBy, getBuildTask, hasBuildDependencies, setBuildTask`

  ### Methods inherited from interface CheckableComponentSpec

  `checkedBy, getCheckTask, setCheckTask`

  ### Methods inherited from interface ComponentSpec

  `getProjectPath`

  ### Methods inherited from interface ModelElement

  `getDisplayName, getName`

- ## Method Details

  - ### getComponent

    NativeComponentSpec getComponent()
    Deprecated.
    The component that this binary was built from.
    Since:
      2.2

  - ### getFlavor

    Flavor getFlavor()
    Deprecated.
    The `Flavor` that this binary was built with.
    Since:
      2.2

  - ### getTargetPlatform

    NativePlatform getTargetPlatform()
    Deprecated.
    Returns the `NativePlatform` that this binary is targeted to run on.
    Since:
      2.2

  - ### getBuildType

    BuildType getBuildType()
    Deprecated.
    Returns the `BuildType` used to construct this binary.
    Since:
      2.2

  - ### getLibs

    Collection<NativeDependencySet> getLibs()
    Deprecated.
    The libraries that should be linked into this binary.
    Since:
      2.2

  - ### lib

    void lib(Object library)
    Deprecated.
    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')
    Since:
      2.2

  - ### getToolChain

    NativeToolChain getToolChain()
    Deprecated.
    Returns the `NativeToolChain` that will be used to build this binary.
    Since:
      2.2

  - ### getLinker

    Tool getLinker()
    Deprecated.
    The configuration of the linker used when linking this binary. Valid for `SharedLibraryBinarySpec` and `NativeExecutableBinarySpec`.
    Since:
      2.2

  - ### getStaticLibArchiver

    Tool getStaticLibArchiver()
    Deprecated.
    The configuration of the static library archiver used when creating this binary. Valid for `StaticLibraryBinarySpec`.
    Since:
      2.2

  - ### getAssembler

    Tool getAssembler()
    Deprecated.
    The configuration of the assembler used when compiling assembly sources this binary. Valid for `SharedLibraryBinarySpec`, `StaticLibraryBinarySpec` and `NativeExecutableBinarySpec` when the 'assembler' plugin is applied.
    Since:
      2.10

  - ### getcCompiler

    PreprocessingTool getcCompiler()
    Deprecated.
    The configuration of the C compiler used when compiling C sources for this binary. Valid for `SharedLibraryBinarySpec`, `StaticLibraryBinarySpec` and `NativeExecutableBinarySpec` when the 'c' plugin is applied.
    Since:
      2.10

  - ### getCppCompiler

    PreprocessingTool getCppCompiler()
    Deprecated.
    The configuration of the C++ compiler used when compiling C++ sources for this binary. Valid for `SharedLibraryBinarySpec`, `StaticLibraryBinarySpec` and `NativeExecutableBinarySpec` when the 'cpp' plugin is applied.
    Since:
      2.10

  - ### getObjcCompiler

    PreprocessingTool getObjcCompiler()
    Deprecated.
    The configuration of the Objective-C compiler used when compiling Objective-C sources for this binary. Valid for `SharedLibraryBinarySpec`, `StaticLibraryBinarySpec` and `NativeExecutableBinarySpec` when the 'objective-c' plugin is applied.
    Since:
      2.10

  - ### getObjcppCompiler

    PreprocessingTool getObjcppCompiler()
    Deprecated.
    The configuration of the Objective-C++ compiler used when compiling Objective-C++ sources for this binary. Valid for `SharedLibraryBinarySpec`, `StaticLibraryBinarySpec` and `NativeExecutableBinarySpec` when the 'objective-cpp' plugin is applied.
    Since:
      2.10

  - ### getRcCompiler

    PreprocessingTool getRcCompiler()
    Deprecated.
    The configuration of the Resource compiler used when compiling resources for this binary. Valid for `SharedLibraryBinarySpec`, `StaticLibraryBinarySpec` and `NativeExecutableBinarySpec` when the 'windows-resources' plugin is applied.
    Since:
      2.10