forked from bjh83/antlr-example
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
58 lines (44 loc) · 1.09 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
buildscript {
repositories {
maven {
name 'JFrog OSS snapshot repo'
url 'https://oss.jfrog.org/oss-snapshot-local/'
}
}
dependencies {
classpath 'me.champeau.gradle:antlr4-gradle-plugin:0.1.1-SNAPSHOT'
}
}
repositories {
mavenCentral()
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'application'
apply plugin: 'me.champeau.gradle.antlr4'
sourceCompatibility = 1.7
mainClassName = 'cwru.compilers.Calculator'
dependencies {
compile 'commons-cli:commons-cli:1.2'
testCompile 'junit:junit:4.+'
testCompile 'org.hamcrest:hamcrest-all:1.3'
}
// make the Java compile task depend on the antlr4 task
compileJava.dependsOn antlr4
// add the generated source files to the list of java sources
sourceSets.main.java.srcDirs += antlr4.output
// add antlr4 to classpath
configurations {
compile.extendsFrom antlr4
}
jar {
manifest {
attributes 'Main-Class': mainClassName
}
}
test {
testLogging {
events "passed", "skipped", "failed"
exceptionFormat "full" // default is "short"
}
}