Package org.gradle.nativeplatform.tasks

## Class CreateStaticLibrary

- java.lang.Object
- - org.gradle.api.internal.AbstractTask
  - - org.gradle.api.DefaultTask
    - - org.gradle.nativeplatform.tasks.CreateStaticLibrary

- All Implemented Interfaces:
    `Comparable<Task>`, `org.gradle.api.internal.DynamicObjectAware`, `org.gradle.api.internal.TaskInternal`, `ExtensionAware`, `Task`, `ObjectFilesToBinary`, `org.gradle.util.Configurable<Task>`

      public class CreateStaticLibrary
      extends DefaultTask
      implements ObjectFilesToBinary

  Assembles a static library from object files.

- - ### 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
    --- | ---
    `CreateStaticLibrary()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `RegularFileProperty` | `getBinaryFile()` | The file where the linked binary will be located.
    `org.gradle.internal.operations.logging.BuildOperationLoggerFactory` | `getOperationLoggerFactory()` |
    `RegularFileProperty` | `getOutputFile()` | The file where the output binary will be located.
    `FileCollection` | `getSource()` | The source object files to be passed to the archiver.
    `ListProperty<String>` | `getStaticLibArgs()` | Additional arguments passed to the archiver.
    `Property<NativePlatform>` | `getTargetPlatform()` | The platform being linked for.
    `Property<NativeToolChain>` | `getToolChain()` | The tool chain used for linking.
    `protected void` | `link()` |
    `void` | `source​(Object source)` | Adds a set of object files to be linked.

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

      `appendParallelSafeAction, compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getIdentityPath, getImpliesSubProjects, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOnlyIf, getOutputs, getPath, getProject, getRequiredServices, getServices, getSharedResources, getShouldRunAfter, getStandardOutputCapture, getState, getTaskActions, getTaskDependencies, getTaskIdentity, getTemporaryDir, getTemporaryDirFactory, getTimeout, hasProperty, hasTaskActions, injectIntoNewInstance, isEnabled, isHasCustomActions, mustRunAfter, onlyIf, onlyIf, prependParallelSafeAction, property, replaceLogger, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setImpliesSubProjects, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, toString, usesService`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.lang.Comparable

      `compareTo`

    - ### Methods inherited from interface org.gradle.api.plugins.ExtensionAware

      `getExtensions`

    - ### Methods inherited from interface org.gradle.api.Task

      `configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getConvention, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getFinalizedBy, getGroup, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getPath, getProject, getShouldRunAfter, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService`

- - ### Constructor Detail

    - #### CreateStaticLibrary

          public CreateStaticLibrary()

  - ### Method Detail

    - #### getSource

          @PathSensitive(RELATIVE)
          @InputFiles
          @SkipWhenEmpty
          public FileCollection getSource()

      The source object files to be passed to the archiver.

    - #### source

          public void source​(Object source)

      Adds a set of object files to be linked.

      The provided source object is evaluated as per `Project.files(Object...)`.

      Specified by:
        `source` in interface `ObjectFilesToBinary`

    - #### getOperationLoggerFactory

          @Inject
          public org.gradle.internal.operations.logging.BuildOperationLoggerFactory getOperationLoggerFactory()

    - #### link

          protected void link()

    - #### getToolChain

          @Internal
          public Property<NativeToolChain> getToolChain()

      The tool chain used for linking.
      Since:
        4.7

    - #### getTargetPlatform

          public Property<NativePlatform> getTargetPlatform()

      The platform being linked for.
      Since:
        4.7

    - #### getOutputFile

          @OutputFile
          public RegularFileProperty getOutputFile()

      The file where the output binary will be located.

    - #### getBinaryFile

          @Internal
          public RegularFileProperty getBinaryFile()

      The file where the linked binary will be located.
      Since:
        4.5

    - #### getStaticLibArgs

          @Input
          public ListProperty<String> getStaticLibArgs()

      Additional arguments passed to the archiver.
      Since:
        4.7