Package org.gradle.language.swift.tasks
Class SwiftCompile
- java.lang.Object
-
- org.gradle.api.internal.AbstractTask
-
- org.gradle.api.DefaultTask
-
- org.gradle.language.swift.tasks.SwiftCompile
-
- All Implemented Interfaces:
java.lang.Comparable<Task>
,org.gradle.api.internal.DynamicObjectAware
,org.gradle.api.internal.TaskInternal
,Named
,ExtensionAware
,Task
,Configurable<Task>
@CacheableTask public abstract class SwiftCompile extends DefaultTask
Compiles Swift source files into object files.- Since:
- 4.1
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.gradle.api.Task
Task.Namer
-
-
Field Summary
-
Fields inherited from interface org.gradle.api.Task
TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
-
-
Constructor Summary
Constructors Constructor Description SwiftCompile(org.gradle.nativeplatform.internal.CompilerOutputFileNamingSchemeFactory compilerOutputFileNamingSchemeFactory, org.gradle.internal.file.Deleter deleter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
compile(InputChanges inputs)
ListProperty<java.lang.String>
getCompilerArgs()
Additional arguments to provide to the compiler.protected CompilerVersion
getCompilerVersion()
The compiler used, including the type and the version.Property<java.lang.Boolean>
getDebuggable()
Should the compiler generate debuggable code?ListProperty<java.lang.String>
getMacros()
Macros that should be defined for the compiler.RegularFileProperty
getModuleFile()
The location to write the Swift module file to.Property<java.lang.String>
getModuleName()
The name of the module to produce.ConfigurableFileCollection
getModules()
The modules required to compile the source.DirectoryProperty
getObjectFileDir()
The directory where object files will be generated.Property<java.lang.Boolean>
getOptimized()
Should the compiler generate optimized code?ConfigurableFileCollection
getSource()
Returns the source files to be compiled.Property<SwiftVersion>
getSourceCompatibility()
Returns the Swift language level to use to compile the source files.Property<NativePlatform>
getTargetPlatform()
The platform being compiled for.Property<NativeToolChain>
getToolChain()
The tool chain used for compilation.boolean
isDebuggable()
Should the compiler generate debuggable code?boolean
isOptimized()
Should the compiler generate debuggable code?-
Methods inherited from class org.gradle.api.DefaultTask
compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService
-
Methods inherited from class org.gradle.api.internal.AbstractTask
acceptServiceReferences, appendParallelSafeAction, doNotTrackState, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, setImpliesSubProjects
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.gradle.api.Task
doNotTrackState, getConvention, notCompatibleWithConfigurationCache
-
-
-
-
Method Detail
-
getToolChain
@Internal public Property<NativeToolChain> getToolChain()
The tool chain used for compilation.- Since:
- 4.7
-
getTargetPlatform
public Property<NativePlatform> getTargetPlatform()
The platform being compiled for.- Since:
- 4.7
-
getSource
@InputFiles @SkipWhenEmpty @IgnoreEmptyDirectories @PathSensitive(RELATIVE) public ConfigurableFileCollection getSource()
Returns the source files to be compiled.- Since:
- 4.4
-
getMacros
@Input public ListProperty<java.lang.String> getMacros()
Macros that should be defined for the compiler.Macros do not have values in Swift; they are either present or absent.
- Since:
- 4.7
-
isDebuggable
@Internal public boolean isDebuggable()
Should the compiler generate debuggable code?- Since:
- 4.7
-
getDebuggable
@Input public Property<java.lang.Boolean> getDebuggable()
Should the compiler generate debuggable code?- Since:
- 4.7
-
isOptimized
@Internal public boolean isOptimized()
Should the compiler generate debuggable code?- Since:
- 4.7
-
getOptimized
@Input public Property<java.lang.Boolean> getOptimized()
Should the compiler generate optimized code?- Since:
- 4.7
-
getCompilerArgs
@Input public ListProperty<java.lang.String> getCompilerArgs()
Additional arguments to provide to the compiler.- Since:
- 4.4
-
getObjectFileDir
@OutputDirectory public DirectoryProperty getObjectFileDir()
The directory where object files will be generated.- Since:
- 4.4
-
getModuleFile
@OutputFile public RegularFileProperty getModuleFile()
The location to write the Swift module file to.- Since:
- 4.4
-
getModuleName
@Optional @Input public Property<java.lang.String> getModuleName()
The name of the module to produce.
-
getModules
@InputFiles @PathSensitive(NAME_ONLY) public ConfigurableFileCollection getModules()
The modules required to compile the source.- Since:
- 4.4
-
getSourceCompatibility
@Input public Property<SwiftVersion> getSourceCompatibility()
Returns the Swift language level to use to compile the source files.- Since:
- 4.6
-
getCompilerVersion
protected CompilerVersion getCompilerVersion()
The compiler used, including the type and the version.- Since:
- 4.4
-
compile
protected void compile(InputChanges inputs)
-
-