# Interface ComponentWithExecutable

All Superinterfaces:
  `ComponentWithNativeRuntime, Named, SoftwareComponent`

All Known Subinterfaces:
  `CppExecutable, CppTestExecutable, SwiftExecutable, SwiftXCTestExecutable`

public interface ComponentWithExecutable extends ComponentWithNativeRuntime
Represents a native component that produces an executable.

Since:
  4.5

- ## Nested Class Summary

  ### Nested classes/interfaces inherited from interface Named

  `Named.Namer`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Provider<RegularFile>`
  `getExecutableFile()`
  Returns the executable file to produce.
  `Provider<? extends Task>`
  `getExecutableFileProducer()`
  Returns the task that should be run to produce the executable file of this component.
  `FileCollection`
  `getLinkLibraries()`
  Returns the link libraries to use to link the executable.
  `Provider<? extends LinkExecutable>`
  `getLinkTask()`
  Returns the link task for the executable.

  ### Methods inherited from interface ComponentWithNativeRuntime

  `getBaseName, getTargetMachine, getToolChain, isDebuggable, isOptimized`

  ### Methods inherited from interface Named

  `getName`

- ## Method Details

  - ### getLinkLibraries

    FileCollection getLinkLibraries()
    Returns the link libraries to use to link the executable. Includes the link libraries of the component's dependencies.
    Since:
      4.5

  - ### getExecutableFileProducer

    Provider<? extends Task> getExecutableFileProducer()
    Returns the task that should be run to produce the executable file of this component. This isn't necessarily the link task for the component.
    Since:
      5.1

  - ### getExecutableFile

    Provider<RegularFile> getExecutableFile()
    Returns the executable file to produce.
    Since:
      4.5

  - ### getLinkTask

    Provider<? extends LinkExecutable> getLinkTask()
    Returns the link task for the executable.
    Since:
      4.5