Groovy Documentation

org.gradle.api.distribution
[Java] Interface Distribution

org.gradle.api.distribution.Distribution
  org.gradle.api.Named
All Superinterfaces:
Named

@Incubating
public interface Distribution
extends Named

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


Method Summary
CopySpec contents(Action action)

Configures the contents of the distribution.

String getBaseName()

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

CopySpec getContents()

The contents of the distribution.

String getName()

The name of this distribution.

void setBaseName(String baseName)

The baseName of the distribution.

 
Methods inherited from interface Named
getName
 

Method Detail

contents

public CopySpec contents(Action action)
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

public String getBaseName()
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

public CopySpec getContents()
The contents of the distribution.


getName

public String getName()
The name of this distribution.


setBaseName

public void setBaseName(String baseName)
The baseName of the distribution.

Set to change the name of the distribution archives.


 

Gradle API 1.8