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 we can also do this by passing values via the command line.
The default properties that 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. |
|
|
The description of the project. |
|
|
The directory containing the build script. The value is read-only. |
|
|
Get Gradle Effective Implementations Guide - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.