-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.gradle
62 lines (53 loc) · 1.33 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
import org.jetbrains.grammarkit.tasks.*
apply plugin: 'org.jetbrains.grammarkit'
def genRoot = file('gen')
sourceSets {
main {
java.srcDirs += genRoot
resources.srcDir 'resources'
}
test {
java.srcDir 'test'
resources.srcDirs 'testData'
}
}
idea {
module {
generatedSourceDirs += genRoot
}
}
def loadPlugins = [
"com.jetbrains.php:${phpPluginVersion}",
'com.intellij.css',
'java',
'java-i18n',
'properties',
"PsiViewer:${psiViewerPluginVersion}"
]
intellij {
version.set(ideaVersion)
pluginName.set(pluginNameFluid)
plugins.set(loadPlugins)
}
def publishChannels = ["nightly"]
publishPlugin {
channels.set(publishChannels)
token.set(System.getenv('PUBLISH_TOKEN'))
}
task generateFluidLexer(type: GenerateLexerTask) {
source = "src/main/grammars/FluidLexer.flex"
targetDir = "gen/com/cedricziel/idea/fluid/lang/lexer"
targetClass = "_FluidLexer"
}
task generateFluidParser(type: GenerateParserTask) {
source = "src/main/grammars/FluidParser.bnf"
targetRoot = 'gen'
pathToParser = '/com/cedricziel/idea/fluid/lang/parser/FluidParserGenerated.java'
pathToPsiRoot = '/com/cedricziel/idea/fluid/lang/psi'
}
compileJava {
dependsOn generateFluidParser, generateFluidLexer
}
clean.doLast {
file('gen').deleteDir()
}