task count << {
4.times {
print "$it " }
}
Execute the following command in the command prompt. It executes the script stated above. You should execute this, where the build.gradle file is stored.
$ gradle –q count
output:0 1 2 3
$ gradle –q count
output:0 1 2 3