Add example with custom task in one and separate files

This commit is contained in:
Juraj Michalek committed 2015-02-26 14:57:07 +01:00
1 parent 6233b16f67
commit f69e857849
5 files changed
+68

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
// Based on example: https://gradle.org/docs/current/userguide/custom_tasks.html
// Use the default greeting
task hello(type: GreetingTask)
// Customize the greeting
task greeting(type: GreetingTask) {
greeting = 'greetings from Brno'
}
class GreetingTask extends DefaultTask {
String greeting = 'hello from Y Soft'
@TaskAction
def greet() {
println greeting
}
}