mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 09:40:21 +00:00
21 lines
450 B
Groovy
21 lines
450 B
Groovy
apply plugin: GreetingPlugin
|
|
|
|
greeting {
|
|
message = 'Hi'
|
|
greeter = 'Gradle'
|
|
}
|
|
|
|
class GreetingPlugin implements Plugin<Project> {
|
|
void apply(Project project) {
|
|
project.extensions.create("greeting", GreetingPluginExtension)
|
|
project.task('hello') << {
|
|
println "${project.greeting.message} from ${project.greeting.greeter}"
|
|
}
|
|
}
|
|
}
|
|
|
|
class GreetingPluginExtension {
|
|
String message
|
|
String greeter
|
|
}
|