api / org.gradle.language.swift.tasks / SwiftCompile

SwiftCompile

@Incubating @CacheableTask open class SwiftCompile : DefaultTask

Compiles Swift source files into object files.

Since
4.1

Constructors

<init>

SwiftCompile(compilerOutputFileNamingSchemeFactory: CompilerOutputFileNamingSchemeFactory)

Functions

getCompilerArgs

open fun getCompilerArgs(): ListProperty<String>

Additional arguments to provide to the compiler.

getDebuggable

open fun getDebuggable(): Property<Boolean>

Should the compiler generate debuggable code?

getMacros

open fun getMacros(): ListProperty<String>

Macros that should be defined for the compiler.

Macros do not have values in Swift; they are either present or absent.

getModuleFile

open fun getModuleFile(): RegularFileProperty

The location to write the Swift module file to.

getModuleName

open fun getModuleName(): Property<String>

The name of the module to produce.

getModules

open fun getModules(): ConfigurableFileCollection

The modules required to compile the source.

getObjectFileDir

open fun getObjectFileDir(): DirectoryProperty

The directory where object files will be generated.

getOptimized

open fun getOptimized(): Property<Boolean>

Should the compiler generate optimized code?

getSource

open fun getSource(): ConfigurableFileCollection

Returns the source files to be compiled.

getSourceCompatibility

open fun getSourceCompatibility(): Property<SwiftVersion>

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

getTargetPlatform

open fun getTargetPlatform(): Property<NativePlatform>

The platform being compiled for.

getToolChain

open fun getToolChain(): Property<NativeToolChain>

The tool chain used for compilation.

isDebuggable

open fun isDebuggable(): Boolean

Should the compiler generate debuggable code?

isOptimized

open fun isOptimized(): Boolean

Should the compiler generate debuggable code?