-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
48 lines (39 loc) · 1000 Bytes
/
build.gradle
File metadata and controls
48 lines (39 loc) · 1000 Bytes
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
plugins {
id 'java'
id 'antlr'
}
group = 'com.mpl'
version = '0.1-alpha'
repositories {
mavenCentral()
}
dependencies {
antlr 'org.antlr:antlr4:4.13.1'
implementation 'org.antlr:antlr4-runtime:4.13.1'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.hamcrest:hamcrest:2.2'
}
generateGrammarSource {
maxHeapSize = "64m"
arguments += ["-visitor", "-listener", "-package", "com.mpl.parser"]
outputDirectory = file("${project.buildDir}/generated-src/antlr/main/com/mpl/parser")
}
compileJava.dependsOn generateGrammarSource
sourceSets {
main {
java {
srcDirs += "${project.buildDir}/generated-src/antlr/main"
}
}
}
test {
testLogging {
events "passed", "skipped", "failed"
exceptionFormat "full"
}
}
task parseExamples(type: JavaExec, dependsOn: classes) {
mainClass = 'com.mpl.test.ParseExamples'
classpath = sourceSets.main.runtimeClasspath
args = ['examples']
}