mirror of
https://github.com/ysoftdevs/gradle-training.git
synced 2026-11-30 12:23:59 +01:00
12 custom plugin
This commit is contained in:
1 parent
e3e264d8c2
commit
78f70e52c4
3 files changed
+19
No files matched your search
@@ -0,0 +1,2 @@
|
|||||||
|
apply from: "helloPlugin.gradle"
|
||||||
|
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
task helloFromPlugin() {
|
||||||
|
description "Say Hello! Code implemented in plugin."
|
||||||
|
doLast {
|
||||||
|
println "Hello from plugin!"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -109,6 +109,7 @@ building decorators.
|
|||||||
gradle tasks
|
gradle tasks
|
||||||
gradle helloWorld
|
gradle helloWorld
|
||||||
|
|
||||||
|
|
||||||
## 11-task-class
|
## 11-task-class
|
||||||
|
|
||||||
Gradle allows to define custom task class. This class should contain
|
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 today
|
||||||
gradle verboseToday
|
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
|
||||||
Reference in new issue
Block a user