api / org.gradle.api / Project / artifacts

artifacts

abstract fun artifacts(configureClosure: Closure<Any>): Unit

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 } 

Parameters

configureClosure - the closure to use to configure the published artifacts.

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

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 } 

Parameters

configureAction - the action to use to configure the published artifacts.

Since
3.5