-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
83 lines (72 loc) · 2.23 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
apply plugin: "application"
apply plugin: "antlr"
apply plugin: "jacoco"
version = "0.0.1"
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
[compileJava, compileTestJava]*.options*.encoding = "UTF-8"
mainClassName = "com.miyagilabs.blindfold.Blindfold"
repositories {
mavenCentral()
}
dependencies {
antlr group: "org.antlr", name: "antlr4", version: "4.7"
testCompile group: "junit", name: "junit", version: "4.12"
}
jar {
manifest {
attributes "Specification-Title": "Blindfold"
attributes "Specification-Version": version
attributes "Specification-Vendor": "Miyagilabs"
}
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
}
tasks.withType(Test) {
testLogging {
events "FAILED", "PASSED", "SKIPPED", "STANDARD_ERROR"
showCauses = true
showExceptions = true
showStackTraces = true
showStandardStreams = true
afterSuite { desc, result ->
if(!desc.parent) {
def output = "Results: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped)"
def startItem = "| ", endItem = " |"
def repeatLength = startItem.length() + output.length() + endItem.length()
println("\n" + ("-" * repeatLength) + "\n" + startItem + output + endItem + "\n" + ("-" * repeatLength))
}
}
}
}
generateGrammarSource {
arguments += ["-package", "com.miyagilabs.blindfold.antlr4", "-long-messages"]
doLast {
copy {
from "build/generated-src/antlr/main/"
include "*.java"
into "src/main/java/com/miyagilabs/blindfold/antlr4"
}
delete "build/generated-src/antlr"
}
}
jacoco {
toolVersion = "0.7.9"
}
jacocoTestReport {
afterEvaluate {
classDirectories = files(
classDirectories.files.collect {
fileTree(dir: it, exclude: "com/miyagilabs/blindfold/antlr4/**")
})
}
reports {
html.enabled true
xml.enabled true
csv.enabled true
}
}
task wrapper(type: Wrapper) {
gradleVersion = "2.10"
}