This chapter is under construction.
This chapter describes the various types which make up the Gradle build DSL.
Table A.1. Core types
Table A.2. Task types
Type | Description |
IdeaProject |
Generates an IDEA project file. |
Tar |
Assembles a TAR archive. |
Zip |
Assembles a ZIP archive. |
The main API you use to interact with Gradle from your build file.
Name | Type | Description |
name
|
String (read-only) |
The name of the project. |
path
|
String (read-only) |
The path of the project. |
Name | Signature | Description |
file
|
File file(Object path)
|
Resolves a file path relative to the project directory of this project. |
Name | Type | Description |
reportsDirName
|
String
|
The name of the reports directory, relative to the project's build directory. |
Name | Type | Description |
distsDir
|
File (read-only) |
The directory which distributions should be generated into. |
Represents a logical group of Java source and resources.
Name | Type | Description |
name
|
String (read-only) |
The name of the source set. |
compileClasspath
|
FileCollection
|
The classpath used to compile this source. |
runtimeClasspath
|
FileCollection
|
The classpath used to execute this source. |
Name | Type | Description |
groovy
|
SourceDirectorySet
(read-only) |
The source to be compiled by the Groovy compiler for this source set. Any Java source present in this set will be passed to the Groovy compiler for joint compilation. |
Generates an IDEA project file.
Name | Type | Description |
outputFile
|
File
|
The ipr file. |
javaVersion
|
String
|
The java version used for defining the project sdk. |
Assembles a TAR archive.
Name | Type | Description |
compression
|
Compression
|
The compression to use for this archive. |
archiveName
|
String
|
The archive name. If the name has not been explicitly set, the pattern for the name is:
[baseName]-[appendix]-[version]-[classifier].[extension] . |
destinationDir
|
File
|
The directory where the archive is generated into. |
includes
|
Set
|
The set of include patterns. |
excludes
|
Set
|
The set of exclude patterns. |
Assembles a ZIP archive.
Name | Type | Description |
archiveName
|
String
|
The archive name. If the name has not been explicitly set, the pattern for the name is:
[baseName]-[appendix]-[version]-[classifier].[extension] . |
destinationDir
|
File
|
The directory where the archive is generated into. |
includes
|
Set
|
The set of include patterns. |
excludes
|
Set
|
The set of exclude patterns. |