12 custom plugin

This commit is contained in:
Juraj Michalek
2014-05-09 22:50:00 +02:00
parent e3e264d8c2
commit 78f70e52c4
3 changed files with 19 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
apply from: "helloPlugin.gradle"

View File

@@ -0,0 +1,8 @@
task helloFromPlugin() {
description "Say Hello! Code implemented in plugin."
doLast {
println "Hello from plugin!"
}
}

View File

@@ -109,6 +109,7 @@ building decorators.
gradle tasks
gradle helloWorld
## 11-task-class
Gradle allows to define custom task class. This class should contain
@@ -120,3 +121,11 @@ Each property defined on class level is configurable from gradle task
gradle today
gradle verboseToday
## 12-custom-plugin
It's possible to specify tasks outside build.gradle and then "include" file.
Gradle uses notion of plugins. Check helloPlugin.gradle file.
gradle tasks
gradle helloFromPlugin