Package org.gradle.language.swift
Interface SwiftComponent
- All Superinterfaces:
Named
,SoftwareComponent
- All Known Subinterfaces:
SwiftApplication
,SwiftLibrary
,SwiftXCTestSuite
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
Modifier and TypeMethodDescriptionReturns the binary of the component to use as the default for development.Returns the implementation dependencies of this component.Defines the Swift module for this component.Defines the source files or directories of this component.Returns the Swift source files of this component, as defined ingetSource()
.void
source
(Action<? super ConfigurableFileCollection> action) Configures the source files or directories for this component.
-
Method Details
-
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
Configures the source files or directories for this component. -
getSwiftSource
FileCollection getSwiftSource()Returns the Swift source files of this component, as defined ingetSource()
. -
getDevelopmentBinary
SwiftBinary getDevelopmentBinary()Returns the binary of the component to use as the default for development. -
getImplementationDependencies
Configuration getImplementationDependencies()Returns the implementation dependencies of this component.
-