Configuration

Learn how to configure tasks in Gradle.

Configuring a task

Once you’ve added some plugins, configure some of the properties of a task for your purposes.

For example, specify a version of Gradle for the Gradle wrapper task:

task wrapper(type: Wrapper) {
     gradleVersion = '5.1'
}

The properties available depend on what task we are configuring.

Extra configuration

To provide extra properties within your Gradle build file, use the ext method. We can define any arbitrary values within the closure, and they will be available throughout your project.

We can also ...