mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-12-29 05:11:00 +00:00
Support for gradle files
This commit is contained in:
20
samples/Gradle/builder.gradle
Normal file
20
samples/Gradle/builder.gradle
Normal file
@@ -0,0 +1,20 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user