-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
41 lines (35 loc) · 971 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
plugins {
id 'java'
id 'antlr'
id 'idea'
}
group 'org.antlr.study'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
antlr "org.antlr:antlr4:4.8"
implementation "org.antlr:antlr4-runtime:4.8-1"
implementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.13.3'
testImplementation group: 'junit', name: 'junit', version: '4.12'
}
generateGrammarSource {
maxHeapSize = "64m"
arguments += ["-visitor",
"-long-messages",
"-package", "org.antlr.study.generated"
]
doLast {
println "Copying generated grammar lexer/parser files to main directory."
copy {
from "${buildDir}/generated-src/antlr/main"
into "src/main/java/org/antlr/study/generated"
}
println "Deleting generated grammar lexer/parser files."
delete "${buildDir}/generated-src/"
}
}
clean.doLast {
file('generated-src').deleteDir()
}