# SwiftComponent

interface SwiftComponent : ComponentWithBinaries, ComponentWithDependencies, ComponentWithTargetMachines(source)

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

#### Inheritors

SwiftXCTestSuite
ProductionSwiftComponent

## Functions

getBinaries
Link copied to clipboard
abstract fun getBinaries(): BinaryCollection<out SwiftBinary>
Returns the binaries for this library.
getDependencies
Link copied to clipboard
abstract fun getDependencies(): ComponentDependencies
Returns the dependencies of this component.
getImplementationDependencies
Link copied to clipboard
abstract fun getImplementationDependencies(): Configuration
Returns the implementation dependencies of this component.
getModule
Link copied to clipboard
abstract fun getModule(): Property<String>
Defines the Swift module for this component.
getName
Link copied to clipboard
abstract fun getName(): String
The object's name.
getSource
Link copied to clipboard
abstract fun getSource(): ConfigurableFileCollection
Defines the source files or directories of this component.
getSourceCompatibility
Link copied to clipboard
abstract fun getSourceCompatibility(): Property<SwiftVersion>
Returns the Swift language level to use to compile the source files.
getSwiftSource
Link copied to clipboard
abstract fun getSwiftSource(): FileCollection
Returns the Swift source files of this component, as defined in getSource.
getTargetMachines
Link copied to clipboard
abstract fun getTargetMachines(): SetProperty<TargetMachine>
Specifies the target machines this component should be built for.
source
Link copied to clipboard
abstract fun source(action: Action<in ConfigurableFileCollection>)
Configures the source files or directories for this component.