July 2015
Intermediate to advanced
284 pages
5h 41m
English
In the last section, we learned how to install Gradle. Now it's time create our very first Gradle script. This script will print Hello Gradle- This is your first script on the console. Just open a text editor, type in the following three lines, and save the file as build.gradle.
task helloGradle << {
println 'Hello Gradle- This is your first script'
}Then execute the gradle helloGradle command as follows:
$ gradle helloGradle :helloGradle Hello Gradle- This is your first script BUILD SUCCESSFUL Total time: 4.808 secs
So, what have we done here?
build.gradle. This is the default name given to a build file. You can give any name to the build file. However, to execute the script, ...Read now
Unlock full access