-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
49 lines (42 loc) · 985 Bytes
/
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
plugins {
id 'java'
id 'antlr'
id 'idea'
}
group 'org.example'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
antlr "org.antlr:antlr4:4.9.2"
compile "org.antlr:antlr4-runtime:4.9.2"
testImplementation(platform('org.junit:junit-bom:5.7.0'))
testImplementation('org.junit.jupiter:junit-jupiter')
}
generateGrammarSource {
maxHeapSize = "128m"
arguments += ['-package', 'me.tomassetti.examples.MarkupParser', '-visitor', '-no-listener']
}
compileJava.dependsOn generateGrammarSource
sourceSets {
generated {
java.srcDir 'generated-src/antlr/main/'
}
}
compileJava.source sourceSets.generated.java, sourceSets.main.java
clean{
delete "generated-src"
}
idea {
module {
sourceDirs += file("generated-src/antlr/main/")
}
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}