-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
117 lines (96 loc) · 2.44 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
defaultTasks 'build'
subprojects {
apply plugin: 'java'
apply plugin: 'checkstyle'
apply plugin: 'findbugs'
apply plugin: 'jacoco'
defaultTasks 'build'
project.ext.libVersions = [
curator: "2.4.2",
slf4j: "1.7.7",
logback: "1.1.2",
findbugs: "2.0.3",
junit: "4.10",
guice: "3.0",
metrics: "3.0.2",
guava: "17.0",
mockito: "1.9.5",
]
sourceSets {
integTest {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
}
}
configurations {
integTestCompile {
extendsFrom testCompile, compile
}
integTestRuntime.extendsFrom testRuntime
}
repositories {
mavenCentral()
}
group = 'org.waterprinciple.cultivar'
version = '1.0.0-SNAPSHOT'
dependencies {
compile (
"javax.inject:javax.inject:1",
"com.google.code.findbugs:jsr305:${libVersions.findbugs}",
"com.google.code.findbugs:annotations:${libVersions.findbugs}",
"org.slf4j:slf4j-api:${libVersions.slf4j}",
"com.google.guava:guava:${libVersions.guava}",
)
testCompile (
"junit:junit:${libVersions.junit}",
"org.mockito:mockito-all:${libVersions.mockito}",
"ch.qos.logback:logback-classic:${libVersions.logback}",
)
}
checkstyle {
toolVersion = '5.7'
showViolations = true
sourceSets = [sourceSets.main]
configFile = file("$rootDir/config/checkstyle/checkstyle.xml")
ignoreFailures = false
}
findbugs {
toolVersion = "${libVersions.findbugs}"
sourceSets = [sourceSets.main]
ignoreFailures = false
}
tasks.withType(FindBugs) {
reports {
xml.enabled = false
html.enabled = true
}
}
jacocoTestReport {
reports {
html.enabled = true
csv.enabled = true
xml.enabled = true
}
}
task integTest(type: Test) {
testClassesDir = sourceSets.integTest.output.classesDir
classpath = sourceSets.integTest.runtimeClasspath
testReportDir = file("$buildDir/reports/integTests")
jacoco {
destinationFile = file("$buildDir/jacoco/test.exec")
append = true
}
}
jacocoTestReport.dependsOn(test)
integTest.dependsOn test
build.dependsOn javadoc
build.dependsOn jacocoTestReport
build.dependsOn integTest
jacocoTestReport.mustRunAfter integTest
tasks.withType(Compile) {
options.compilerArgs << "-Xlint:all"
}
}
wrapper {
gradleVersion '1.12'
}