-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
66 lines (53 loc) · 1.49 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
plugins {
id 'org.jetbrains.intellij' version '1.7.0'
id "org.jetbrains.grammarkit" version "2021.2.2"
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(11))
}
}
apply plugin: 'org.jetbrains.grammarkit'
sourceSets.main.java.srcDirs 'src/main/gen'
group 'org.swim'
version '1.3.0'
repositories {
mavenCentral()
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
}
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version = '2022.1.3'
plugins = ['PsiViewer:221-SNAPSHOT', 'com.intellij.java']
updateSinceUntilBuild = false
}
patchPluginXml {
sinceBuild = '203'
}
test {
systemProperty "idea.home.path", System.getProperty("user.dir")
}
import org.jetbrains.grammarkit.tasks.*
task generateAll {
group = "generate"
dependsOn 'generateReconlLexer'
dependsOn 'generateReconParser'
}
task generateReconlLexer(type: GenerateLexerTask) {
group = "generate"
source = "src/main/java/org/swim/language/Recon.flex"
targetDir = "src/main/gen/org/swim/language"
targetClass = "ReconLexer"
purgeOldFiles = true
}
task generateReconParser(type: GenerateParserTask) {
group = "generate"
source = "src/main/java/org/swim/language/Recon.bnf"
targetRoot = 'src/main/gen/'
pathToParser = 'org/swim/language/parser/ReconParser.java'
pathToPsiRoot = '/org/swim/language/psi'
purgeOldFiles = true
}