-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
91 lines (74 loc) · 1.93 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'antlr'
apply plugin: 'checkstyle'
sourceCompatibility = 1.8
targetCompatibility = 1.8
mainClassName = "i2.act.StarSmithTranslate"
ext.versions = [
antlr: "4.7",
junit: "4.12",
jackson: "2.9.7",
]
repositories {
mavenCentral()
}
dependencies {
antlr \
group: "org.antlr", \
name: "antlr4", \
version: versions.antlr
implementation \
group: "com.fasterxml.jackson.core", \
name: "jackson-core", \
version: versions.jackson
implementation \
group: "com.fasterxml.jackson.core", \
name: "jackson-databind", \
version: versions.jackson
testImplementation \
group: "junit", \
name: "junit", \
version: versions.junit
testImplementation \
group: "com.fasterxml.jackson.dataformat", \
name: "jackson-dataformat-yaml", \
version: versions.jackson
}
test {
testLogging {
exceptionFormat = "full"
}
testLogging.showStandardStreams = true
afterSuite { suite, result ->
if (suite.parent == null) {
def testSummary = " ${result.resultType} (${result.testCount} tests, ${result.failedTestCount} failed, ${result.skippedTestCount} skipped) "
println("\n+" + ('-' * testSummary.length()) + "+\n" + '|' + testSummary + "|\n+" + ('-' * testSummary.length()) + "+\n")
}
}
}
generateGrammarSource {
arguments += ["-visitor", "-no-listener"]
}
jar {
manifest {
attributes "Main-Class": "$mainClassName"
}
from {
configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}
checkstyle {
toolVersion = "7.6.1"
configFile = new File(rootDir, "checkstyle/style.xml")
ignoreFailures = false
}
checkstyleMain.source="src/main"
checkstyleTest.source="src/test"
compileJava {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
compileJava.finalizedBy(jar)
compileTestJava {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}