Interface Distribution

All Superinterfaces:
Named

public interface Distribution extends Named
A distribution allows to bundle an application or a library including dependencies, sources...
  • Method Details

    • getName

      String getName()
      The name of this distribution.
      Specified by:
      getName in interface Named
      Returns:
      The name. Never null.
    • getDistributionBaseName

      Property<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
    • getDistributionClassifier

      @Incubating Property<String> getDistributionClassifier()
      The classifier of the distribution, used as the archive classifier in the archives of this distribution.

      By default, no classifier is added.

      Since:
      7.6
    • 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.