# Distribution

API Documentation: | `Distribution`

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

### Properties

Property | Description
`baseName` | Deprecated Replaced The baseName of the distribution, used in naming the distribution archives.
`contents` | The contents of the distribution.
`distributionBaseName` | Incubating The baseName of the distribution, used in naming the distribution archives.
`name` | The name of this distribution.

### Methods

Method | Description
`contents(action)` | Configures the contents of the distribution.

### Script blocks

No script blocks

### Property details

#### `String` `baseName`

Note: This property is deprecated and will be removed in the next major version of Gradle.

Note: This property has been replaced by distributionBaseName.

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

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

#### `CopySpec` `contents` (read-only)

The contents of the distribution.

#### ``Property`<`String`>` `distributionBaseName`

Note: This property is incubating and may change in a future version of Gradle.

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

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

#### `String` `name` (read-only)

The name of this distribution.

### Method details

#### `CopySpec` `contents`(``Action`<? super `CopySpec`>` action)

Configures the contents of the distribution.

Can be used to configure the contents of the distribution:

    plugins {
        id 'distribution'
    }

    distributions {
        main {
            contents {
                from "src/readme"
            }
        }
    }

The DSL inside the `contents\{` } block is the same DSL used for Copy tasks.