Project properties
In a Gradle build file we can access several properties that are defined by Gradle, but we can also create our own properties. We can set the value of our custom properties directly in the build script and also by passing values via the command line.
The default properties we can access in a Gradle build are displayed in the following table:
Name |
Type |
Default value |
---|---|---|
|
|
The project instance. |
|
|
The name of the project directory. The name is read-only. |
|
|
The absolute path of the project. |
|
|
Description of the project. |
|
|
The directory containing the build script. The value is read-only. |
|
|
Directory with the name build in the directory containing the build script. |
|
|
Not specified. |
|
|
Not specified. |
|
|
An |
The following build file has a task to show the value of the properties:
version...