Package: org.gradle.nativebinaries.tasks

## [Groovy] Class CreateStaticLibrary

- org.gradle.nativebinaries.tasks.CreateStaticLibrary

- All Implemented Interfaces and Traits:
    ObjectFilesToBinary

      @Incubating
      class CreateStaticLibrary
      extends DefaultTask

  Assembles a static library from object files.

- - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `File` | `outputFile` The file where the output binary will be located.
    `List<String>` | `staticLibArgs` Additional arguments passed to the archiver.
    `Platform` | `targetPlatform` The platform being targeted.
    `ToolChain` | `toolChain` The tool chain used for creating the static library.

  - ### Constructor Summary

    Constructors
    Constructor and description
    `CreateStaticLibrary ()`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `def` | `getOutputType()`
    `FileCollection` | `getSource()` The source object files to be passed to the archiver.
    `void` | `link()`
    `void` | `source(Object source)` Adds a set of object files to be linked.

- - ### Property Detail

    - #### @OutputFile File outputFile

      The file where the output binary will be located.

    - #### @Input List<String> staticLibArgs

      Additional arguments passed to the archiver.

    - #### Platform targetPlatform

      The platform being targeted.

    - #### ToolChain toolChain

      The tool chain used for creating the static library.

  - ### Constructor Detail

    - #### @Inject CreateStaticLibrary()

  - ### Method Detail

    - #### @Input def getOutputType()

    - #### @InputFiles @SkipWhenEmpty // Can't use field due to GRADLE-2026 FileCollection getSource()

      The source object files to be passed to the archiver.

    - #### @TaskAction void link()

    - #### void source(Object source)

      Adds a set of object files to be linked.

      The provided source object is evaluated as per Project.files.