-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
77 lines (60 loc) · 1.69 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
buildscript {
repositories {
maven { url 'https://jitpack.io'}
}
dependencies{
classpath "com.github.hurricup:gradle-grammar-kit-plugin:2017.1"
}
}
plugins {
id 'org.jetbrains.intellij' version '0.2.17'
}
group 'technology.svelte'
version '0.0.4'
apply plugin: 'idea'
apply plugin: 'org.jetbrains.intellij'
apply plugin: 'java'
apply plugin: 'org.jetbrains.grammarkit'
// import is optional to make task creation easier
import org.jetbrains.grammarkit.tasks.*
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
}
intellij {
version 'IU-2016.2'
plugins = ['JavascriptLanguage']
pluginName 'Svelte'
intellij.updateSinceUntilBuild false
publish {
pluginId '10021-svelte'
}
}
sourceSets.main.java.srcDir new File(buildDir, 'generated-src/jflex')
idea {
module {
// Marks the already(!) added srcDir as "generated"
generatedSourceDirs += file('build/generated-src/jflex')
}
}
task generateLexer(type: GenerateLexer) {
// source flex file
source = "src/main/jflex/technology/svelte/lexer//svelte.flex"
// target directory for lexer
targetDir = "build/generated-src/jflex"
// target classname, target file will be targetDir/targetClass.java
targetClass = "_SvelteLexer"
// optional, path to the task-specific skeleton file. Default: none
skeleton = 'src/main/jflex/idea-flex.skeleton'
// if set, plugin will remove a lexer output file before generating new one. Default: false
purgeOldFiles = true
}
task generateLexers {
dependsOn generateLexer
}
compileJava {
dependsOn generateLexers
}