mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 09:40:21 +00:00
Support for gradle files
This commit is contained in:
@@ -137,6 +137,8 @@ https://github.com/fsharp/fsharpbinding:
|
|||||||
- source.fsharp
|
- source.fsharp
|
||||||
https://github.com/gingerbeardman/monkey.tmbundle:
|
https://github.com/gingerbeardman/monkey.tmbundle:
|
||||||
- source.monkey
|
- source.monkey
|
||||||
|
https://github.com/alkemist/gradle.tmbundle:
|
||||||
|
- source.groovy.gradle
|
||||||
https://github.com/guillermooo/dart-sublime-bundle/raw/master/Dart.tmLanguage:
|
https://github.com/guillermooo/dart-sublime-bundle/raw/master/Dart.tmLanguage:
|
||||||
- source.dart
|
- source.dart
|
||||||
https://github.com/harrism/sublimetext-cuda-cpp/raw/master/cuda-c%2B%2B.tmLanguage:
|
https://github.com/harrism/sublimetext-cuda-cpp/raw/master/cuda-c%2B%2B.tmLanguage:
|
||||||
|
|||||||
@@ -968,6 +968,12 @@ Grace:
|
|||||||
- .grace
|
- .grace
|
||||||
tm_scope: none
|
tm_scope: none
|
||||||
|
|
||||||
|
Gradle:
|
||||||
|
type: data
|
||||||
|
extensions:
|
||||||
|
- .gradle
|
||||||
|
tm_scope: source.groovy.gradle
|
||||||
|
|
||||||
Grammatical Framework:
|
Grammatical Framework:
|
||||||
type: programming
|
type: programming
|
||||||
aliases:
|
aliases:
|
||||||
|
|||||||
18
samples/Gradle/build.gradle
Normal file
18
samples/Gradle/build.gradle
Normal 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'
|
||||||
|
}
|
||||||
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