-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
38 lines (31 loc) · 939 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
group 'de.az.antlr'
version '1.0-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'antlr'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
// Fix for having Antlr 2 dependency on the classpath
// See https://github.com/gradle/gradle/issues/820
configurations {
compile {
extendsFrom = extendsFrom.findAll { it != configurations.antlr }
}
}
generateGrammarSource {
// The ANTLR plugin does not create the package directory
outputDirectory = new File("${project.buildDir}/generated-src/antlr/main/de/az/antlr/demo/parser")
// No option for setting the package
arguments += [
"-visitor",
"-long-messages",
"-package", "de.az.antlr.demo.parser"
]
}
dependencies {
// Antlr
def antlrVersion = "4.7"
antlr group: "org.antlr", name: "antlr4", version: antlrVersion
compile group: "org.antlr", name: "antlr4-runtime", version: antlrVersion
}