# artifacts

abstract fun artifacts(@DelegatesTo(value = ArtifactHandler::class) configureClosure: Closure)(source)

Configures the published artifacts for this project.

This method executes the given closure against the ArtifactHandler for this project. The is passed to the closure as the closure's delegate.

Example:

    configurations {
      //declaring new configuration that will be used to associate with artifacts
      schema
    }

    task schemaJar(type: Jar) {
      //some imaginary task that creates a jar artifact with the schema
    }

    //associating the task that produces the artifact with the configuration
    artifacts {
      //configuration name and the task:
      schema schemaJar
    }

Content copied to clipboard

#### Parameters

configureClosure

the closure to use to configure the published artifacts.

abstract fun artifacts(configureAction: Action<in ArtifactHandler>)(source)

Configures the published artifacts for this project.

This method executes the given action against the ArtifactHandler for this project.

Example:

    configurations {
      //declaring new configuration that will be used to associate with artifacts
      schema
    }

    task schemaJar(type: Jar) {
      //some imaginary task that creates a jar artifact with the schema
    }

    //associating the task that produces the artifact with the configuration
    artifacts {
      //configuration name and the task:
      schema schemaJar
    }

Content copied to clipboard

#### Since

3.5

#### Parameters

configureAction

the action to use to configure the published artifacts.