api / org.gradle.language.swift / ProductionSwiftComponent

ProductionSwiftComponent

@Incubating interface ProductionSwiftComponent : SwiftComponent, ProductionComponent

Represents a Swift component that is the main product of a project.

Since
4.5

Functions

getDevelopmentBinary

abstract fun getDevelopmentBinary(): Provider<out SwiftBinary>

{@inheritDoc}

Inherited Functions

getBinaries

abstract fun getBinaries(): BinaryCollection<out SwiftBinary>

Returns the binaries for this library.

getImplementationDependencies

abstract fun getImplementationDependencies(): Configuration

Returns the implementation dependencies of this component.

getModule

abstract fun getModule(): Property<String>

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

getOperatingSystems

abstract fun getOperatingSystems(): SetProperty<OperatingSystemFamily>

Specifies the operating systems for the target machine.

getSource

abstract fun getSource(): ConfigurableFileCollection

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.

getSourceCompatibility

abstract fun getSourceCompatibility(): Property<SwiftVersion>

Returns the Swift language level to use to compile the source files.

getSwiftSource

abstract fun getSwiftSource(): FileCollection

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

source

abstract fun source(action: Action<in ConfigurableFileCollection>): Unit

Configures the source files or directories for this component.

Inheritors

SwiftApplication

interface SwiftApplication : ProductionSwiftComponent

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

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

SwiftLibrary

interface SwiftLibrary : ProductionSwiftComponent

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.