# SwiftLibrary

interface SwiftLibrary : ProductionSwiftComponent(source)

Configuration for a Swift library, defining the source files that make up the library plus other settings.

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

#### Since

4.2

## Functions

getApiDependencies
Link copied to clipboard
abstract fun getApiDependencies(): Configuration
Returns the API dependencies of this library.
getBinaries
Link copied to clipboard
abstract fun getBinaries(): BinaryCollection<out SoftwareComponent>
Returns the binaries of this component.
abstract fun getBinaries(): BinaryCollection<out SwiftBinary>
Returns the binaries for this library.
getDependencies
Link copied to clipboard
abstract fun getDependencies(): LibraryDependencies
Returns the dependencies of this library.
getDevelopmentBinary
Link copied to clipboard
abstract fun getDevelopmentBinary(): Provider<out SoftwareComponent>
abstract fun getDevelopmentBinary(): Provider<out SwiftBinary>
Returns the binary of the component to use as the default for development.
getImplementationDependencies
Link copied to clipboard
abstract fun getImplementationDependencies(): Configuration
Returns the implementation dependencies of this component.
getLinkage
Link copied to clipboard
abstract fun getLinkage(): SetProperty<Linkage>
Returns the list of linkage of this library.
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.