Imagine you are working on a Java project that uses Gradle build tool. You want to include the Guava library version 23.0 in your project, and also want to add a custom task called 'sayHello', which simply prints 'Hello, Gradle!' on the console. Fill in the blanks in the given build.gradle file to achieve this task.
Gradle: overview
Adding Guava library and custom task in Gradle
Report a typo
Fill in the gaps with the relevant elements
plugin: 'java'
{
jcenter()
}
{
compile 'com.google.guava:guava:23.0'
}
sayHello {
doLast {
printf 'Hello, Gradle!'
}
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.