Completing a Gradle script for a project with Guava library

Report a typo

You have a basic Gradle script for a Java project, but it is incomplete. Your task is to fill in the blanks in the code so the build script correctly represents a project which uses Guava library as a dependency, it can pull this dependency from Maven Central repository and it has a 'hello' task which prints 'Hello, GUI!' when executed.

Fill in the gaps with the relevant elements
plugins {
    id 'java'
}

 {
    mavenCentral()
}

 {
     'com.google.guava:guava:28.2-jre'
}

task hello {
    doLast {
        println 'Hello, GUI!'
    }
}
dependenciesimplementationrepositories

Create a free account to access the full topic