SwiftComponent (Gradle API 4.10.2)
Date: 2018-09-19

org.gradle.language.swift

## Interface SwiftComponent

- All Superinterfaces:
    ComponentWithBinaries, ComponentWithDependencies, Named, SoftwareComponent
  All Known Subinterfaces:
    ProductionSwiftComponent, SwiftApplication, SwiftLibrary, SwiftXCTestSuite

      @Incubating
      public interface SwiftComponent
      extends ComponentWithBinaries, ComponentWithDependencies

  Configuration for a Swift component, such as a library or executable, defining the source files that make up the component plus other settings.

  Swift component is composed of some Swift source files that are compiled and then linked into some binary.

  An instance of this type is added as a project extension by the Swift plugins.

  Since:
    4.2

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.gradle.api.Named

      `Named.Namer`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `BinaryCollection<? extends SwiftBinary>` | `getBinaries()` Returns the binaries for this library.
    `Configuration` | `getImplementationDependencies()` Returns the implementation dependencies of this component.
    `Property<String>` | `getModule()` Defines the Swift module for this component.
    `SetProperty<OperatingSystemFamily>` | `getOperatingSystems()` Specifies the operating systems for the target machine.
    `ConfigurableFileCollection` | `getSource()` Defines the source files or directories of this component.
    `Property<SwiftVersion>` | `getSourceCompatibility()` Returns the Swift language level to use to compile the source files.
    `FileCollection` | `getSwiftSource()` Returns the Swift source files of this component, as defined in `getSource()`.
    `void` | `source(Action<? super ConfigurableFileCollection> action)` Configures the source files or directories for this component.

    - ### Methods inherited from interface org.gradle.language.ComponentWithDependencies

      `getDependencies`

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

      `getName`

- - ### Method Detail

    - #### getModule

          Property<String> getModule()

      Defines the Swift module for this component. The default value is calculated from the project name.

    - #### getSource

          ConfigurableFileCollection getSource()

      Defines the source files or directories of this component. You can add files or directories to this collection. When a directory is added, all source files are included for compilation.

      When this collection is empty, the directory `src/main/swift` is used by default.

    - #### source

          void source(Action<? super ConfigurableFileCollection> action)

      Configures the source files or directories for this component.

    - #### getSwiftSource

          FileCollection getSwiftSource()

      Returns the Swift source files of this component, as defined in `getSource()`.

    - #### getBinaries

          BinaryCollection<? extends SwiftBinary> getBinaries()

      Returns the binaries for this library.
      Specified by:
        `getBinaries` in interface `ComponentWithBinaries`
      Since:
        4.5

    - #### getImplementationDependencies

          Configuration getImplementationDependencies()

      Returns the implementation dependencies of this component.

    - #### getSourceCompatibility

          Property<SwiftVersion> getSourceCompatibility()

      Returns the Swift language level to use to compile the source files.
      Since:
        4.6

    - #### getOperatingSystems

          SetProperty<OperatingSystemFamily> getOperatingSystems()

      Specifies the operating systems for the target machine.
      Since:
        4.7