api / org.gradle.api.distribution / Distribution

Distribution

@Incubating interface Distribution : Named

A distribution allow to bundle an application or a library including dependencies,sources...

Functions

contents

abstract fun contents(action: Action<in CopySpec>): CopySpec

Configures the contents of the distribution.

Can be used to configure the contents of the distribution:

 apply plugin: "distribution" distributions { main { contents { from "src/readme" } } } 
The DSL inside the contents\{} block is the same DSL used for Copy tasks.

getBaseName

abstract fun getBaseName(): String

The baseName of the distribution, used in naming the distribution archives.

If the #getName() of this distribution is "main" this defaults to the project's name. Otherwise it is "$project.name-$this.name".

getContents

abstract fun getContents(): CopySpec

The contents of the distribution.

getName

abstract fun getName(): String

The name of this distribution.

setBaseName

abstract fun setBaseName(baseName: String): Unit

The baseName of the distribution.

Set to change the name of the distribution archives.

Inheritors

PlayDistribution

interface PlayDistribution : Distribution

Represents a Play distribution package