Cover by Hubert Klein Ikkink

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

O'Reilly logo

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

project

Project

The project instance.

name

String

The name of the project directory. The name is read-only.

path

String

The absolute path of the project.

description

String

Description of the project.

projectDir

File

The directory containing the build script. The value is read-only.

buildDir

File

Directory with the name build ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required