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:
    `Comparable<Task>`, `org.gradle.api.internal.DynamicObjectAware`, `org.gradle.api.internal.TaskInternal`, `ExtensionAware`, `Task`, `org.gradle.util.Configurable<Task>`

      @CacheableTask
      public 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<String>` | `getCompilerArgs()` | Additional arguments to provide to the compiler.
    `protected CompilerVersion` | `getCompilerVersion()` | The compiler used, including the type and the version.
    `Property<Boolean>` | `getDebuggable()` | Should the compiler generate debuggable code?
    `ListProperty<String>` | `getMacros()` | Macros that should be defined for the compiler.
    `RegularFileProperty` | `getModuleFile()` | The location to write the Swift module file to.
    `Property<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<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, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService`

    - ### Methods inherited from class org.gradle.api.internal.AbstractTask

      `appendParallelSafeAction, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getOnlyIf, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isEnabled, isHasCustomActions, 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

      `getConvention`

- - ### Constructor Detail

    - #### SwiftCompile

          @Inject
          public SwiftCompile​(org.gradle.nativeplatform.internal.CompilerOutputFileNamingSchemeFactory compilerOutputFileNamingSchemeFactory,
                              org.gradle.internal.file.Deleter deleter)

  - ### 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
          @PathSensitive(RELATIVE)
          public ConfigurableFileCollection getSource()

      Returns the source files to be compiled.
      Since:
        4.4

    - #### getMacros

          @Input
          public ListProperty<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<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<Boolean> getOptimized()

      Should the compiler generate optimized code?
      Since:
        4.7

    - #### getCompilerArgs

          @Input
          public ListProperty<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<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)