Package org.gradle.api.distribution

## Interface Distribution

- All Superinterfaces:
    `Named`
  All Known Subinterfaces:
    `PlayDistribution`

      public interface Distribution
      extends Named

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

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.gradle.api.Named

      `Named.Namer`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `CopySpec` | `contents​(Action<? super CopySpec> action)` | Configures the contents of the distribution.
    `java.lang.String` | `getBaseName()` | Deprecated. Use #getDistributionBaseName()
    `CopySpec` | `getContents()` | The contents of the distribution.
    `Property<java.lang.String>` | `getDistributionBaseName()` | The baseName of the distribution, used in naming the distribution archives.
    `java.lang.String` | `getName()` | The name of this distribution.
    `void` | `setBaseName​(java.lang.String baseName)` | Deprecated. Use #getDistributionBaseName()

- - ### Method Detail

    - #### getName

          java.lang.String getName()

      The name of this distribution.
      Specified by:
        `getName` in interface `Named`
      Returns:
        The name. Never null.

    - #### getBaseName

          @Deprecated
          @ReplacedBy("distributionBaseName")
          java.lang.String getBaseName()

      Deprecated.
      Use #getDistributionBaseName()
      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`".

    - #### setBaseName

          @Deprecated
          void setBaseName​(java.lang.String baseName)

      Deprecated.
      Use #getDistributionBaseName()
      The baseName of the distribution.

      Set to change the name of the distribution archives.

    - #### getDistributionBaseName

          @Incubating
          Property<java.lang.String> getDistributionBaseName()

      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`".

      Since:
        6.0

    - #### getContents

          CopySpec getContents()

      The contents of the distribution.

    - #### contents

          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.