Support for gradle files

This commit is contained in:
Paul Chaignon
2014-11-28 23:00:35 -05:00
parent cfd95360cb
commit 4ed58c743d
4 changed files with 46 additions and 0 deletions

View File

@@ -137,6 +137,8 @@ https://github.com/fsharp/fsharpbinding:
- source.fsharp
https://github.com/gingerbeardman/monkey.tmbundle:
- source.monkey
https://github.com/alkemist/gradle.tmbundle:
- source.groovy.gradle
https://github.com/guillermooo/dart-sublime-bundle/raw/master/Dart.tmLanguage:
- source.dart
https://github.com/harrism/sublimetext-cuda-cpp/raw/master/cuda-c%2B%2B.tmLanguage:

View File

@@ -968,6 +968,12 @@ Grace:
- .grace
tm_scope: none
Gradle:
type: data
extensions:
- .gradle
tm_scope: source.groovy.gradle
Grammatical Framework:
type: programming
aliases:

View File

@@ -0,0 +1,18 @@
apply plugin: GreetingPlugin
greeting.message = 'Hi from Gradle'
class GreetingPlugin implements Plugin<Project> {
void apply(Project project) {
// Add the 'greeting' extension object
project.extensions.create("greeting", GreetingPluginExtension)
// Add a task that uses the configuration
project.task('hello') << {
println project.greeting.message
}
}
}
class GreetingPluginExtension {
def String message = 'Hello from GreetingPlugin'
}

View 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
}