-
Notifications
You must be signed in to change notification settings - Fork 18
/
build.gradle
71 lines (60 loc) · 1.44 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
import org.jetbrains.grammarkit.tasks.GenerateLexer
import org.jetbrains.grammarkit.tasks.GenerateParser
buildscript {
repositories {
mavenCentral()
}
}
plugins {
id "org.jetbrains.intellij" version "0.4.18"
id "org.jetbrains.grammarkit" version "2019.2"
}
apply plugin: 'idea'
apply plugin: 'org.jetbrains.intellij'
apply plugin: 'org.jetbrains.grammarkit'
intellij {
// see https://www.jetbrains.com/intellij-repository/releases
version 'IC-2019.2'
pluginName 'q'
// see https://github.com/JetBrains/gradle-intellij-plugin/issues/391
buildSearchableOptions.enabled = false
}
version '1.28' // Plugin version
patchPluginXml {
untilBuild '999.*'
}
grammarKit {
jflexRelease = '1.7.0-1'
}
sourceSets {
main {
java {
srcDir 'gen'
}
resources {
srcDir 'src/main/resources'
}
}
}
task generateKLexer(type: GenerateLexer) {
source = "src/main/resources/com/appian/intellij/k/k.flex"
targetDir = "gen/com/appian/intellij/k"
targetClass = "KLexer"
purgeOldFiles = true
}
task generateKParser(type: GenerateParser) {
source = "src/main/resources/com/appian/intellij/k/k.bnf"
targetRoot = 'gen'
pathToParser = 'com/appian/intellij/k/parser/KParser.java'
pathToPsiRoot = 'com/appian/intellij/k/psi'
purgeOldFiles = true
}
compileJava {
dependsOn generateKLexer
dependsOn generateKParser
}
if (project.hasProperty('intellijPublishToken')) {
publishPlugin {
token intellijPublishToken
}
}