Configuration
Explore how to configure Gradle tasks and manage extra properties within your build files. Understand how to include Maven dependencies using Gradle's DSL, set source compatibility for Java versions, and configure secure repositories to optimize your Java project builds.
We'll cover the following...
We'll cover the following...
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 ...