# Interface SwiftBinary

All Superinterfaces:
  `ComponentWithDependencies, ComponentWithNativeRuntime, ComponentWithObjectFiles, Named, SoftwareComponent`

All Known Subinterfaces:
  `SwiftExecutable, SwiftSharedLibrary, SwiftStaticLibrary, SwiftXCTestBinary, SwiftXCTestBundle, SwiftXCTestExecutable`

public interface SwiftBinary extends ComponentWithObjectFiles, ComponentWithDependencies
A binary built from Swift source and linked from the resulting object files.

Since:
  4.2

- ## Nested Class Summary

  ### Nested classes/interfaces inherited from interface Named

  `Named.Namer`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `FileCollection`
  `getCompileModules()`
  Returns the modules to use to compile this binary.
  `Provider<SwiftCompile>`
  `getCompileTask()`
  Returns the compile task for this binary.
  `FileCollection`
  `getLinkLibraries()`
  Returns the link libraries to use to link this binary.
  `Provider<String>`
  `getModule()`
  Returns the name of the Swift module that this binary defines.
  `Provider<RegularFile>`
  `getModuleFile()`
  Returns the module file for this binary.
  `FileCollection`
  `getRuntimeLibraries()`
  Returns the runtime libraries required by this binary.
  `FileCollection`
  `getSwiftSource()`
  Returns the Swift source files of this binary.
  `SwiftPlatform`
  `getTargetPlatform()`
  Returns the target platform for this component.
  `boolean`
  `isTestable()`
  Returns true if this binary has testing enabled.

  ### Methods inherited from interface ComponentWithDependencies

  `getDependencies`

  ### Methods inherited from interface ComponentWithNativeRuntime

  `getBaseName, getTargetMachine, getToolChain, isDebuggable, isOptimized`

  ### Methods inherited from interface ComponentWithObjectFiles

  `getObjects`

  ### Methods inherited from interface Named

  `getName`

- ## Method Details

  - ### getModule

    Provider<String> getModule()
    Returns the name of the Swift module that this binary defines.
    Since:
      4.2

  - ### isTestable

    boolean isTestable()
    Returns true if this binary has testing enabled.
    Since:
      4.4

  - ### getSwiftSource

    FileCollection getSwiftSource()
    Returns the Swift source files of this binary.
    Since:
      4.2

  - ### getCompileModules

    FileCollection getCompileModules()
    Returns the modules to use to compile this binary. Includes the module file of this binary's dependencies.
    Since:
      4.4

  - ### getLinkLibraries

    FileCollection getLinkLibraries()
    Returns the link libraries to use to link this binary. Includes the link libraries of the component's dependencies.
    Since:
      4.2

  - ### getRuntimeLibraries

    FileCollection getRuntimeLibraries()
    Returns the runtime libraries required by this binary. Includes the runtime libraries of the component's dependencies.
    Since:
      4.2

  - ### getCompileTask

    Provider<SwiftCompile> getCompileTask()
    Returns the compile task for this binary.
    Since:
      4.5

  - ### getModuleFile

    Provider<RegularFile> getModuleFile()
    Returns the module file for this binary.
    Since:
      4.6

  - ### getTargetPlatform

    SwiftPlatform getTargetPlatform()
    Returns the target platform for this component.
    Since:
      4.5