Skip to content

Instantly share code, notes, and snippets.

@HIPERCUBE
Last active December 25, 2016 18:33
Show Gist options
  • Save HIPERCUBE/1b171a8b76ac0ba1ff09ca1543a1eef3 to your computer and use it in GitHub Desktop.
Save HIPERCUBE/1b171a8b76ac0ba1ff09ca1543a1eef3 to your computer and use it in GitHub Desktop.
Gradle Left Shift Operation
// Left Shift Operation
task hello << {
println 'Hello world'
}
// Left Shift Operation Test
task first {
doFirst {
println 'Running first'
}
}
task second {
doLast { Task task ->
println "Running ${task.name}"
}
}
task third << { taskObject ->
println 'Running ' + taskObject.name
}

$ gradle first second third
:first
Running first
:second
Running second
:third
Runing third

BUILD SUCCESSFUL

Total time : 4.302 secs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment