forked from Nike-Inc/riposte
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
154 lines (124 loc) · 4.54 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
// ========== GRADLE PLUGINS / REPOSITORIES SETUP
buildscript {
repositories {
jcenter()
}
dependencies {
// STUFF FOR JACOCO
classpath 'com.palantir:jacoco-coverage:0.4.0'
// jacoco-coverage blows up unless you specify guava dependency
classpath 'com.google.guava:guava:18.0'
// Plugin for spitting out coverage numbers to the console
classpath 'com.github.ksoichiro:gradle-console-reporter:0.5.0'
// STUFF FOR BINTRAY
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
}
}
allprojects {
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'groovy'
apply plugin: 'project-report'
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: classes) {
classifier = 'javadoc'
from javadoc
}
javadoc {
failOnError = false
}
artifacts {
archives sourcesJar, javadocJar
}
repositories {
jcenter()
}
idea {
module {
downloadSources = true
}
}
test {
// Travis CI appears to have some resource constraint issues. Make sure tests have enough memory.
maxHeapSize = "1024m"
maxParallelForks = 1
}
//http://www.gradle.org/docs/current/userguide/java_plugin.html
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
// Disable jar, sourcesJar, and javadoc tasks for the root project - we only want them to run for submodules
jar.enabled = false
sourcesJar.enabled = false
javadocJar.enabled = false
// ========== PROPERTIES FOR GRADLE BUILD - DEPENDENCY VERSIONS / ETC
ext {
// DEPENDENCY VERSIONS
slf4jVersion = '1.7.21'
logbackVersion = '1.1.7'
javaxInjectVersion = '1'
wingtipsVersion = '0.14.1'
backstopperVersion = '0.11.4'
fastbreakVersion = '0.10.0'
spockVersion = '0.7-groovy-2.0'
cgLibVersion = '3.1'
objenesisVersion = '2.1'
javassistVersion = '3.18.2-GA'
jacksonVersion = '2.8.9'
ningAsyncHttpClientVersion = '1.9.38'
guiceVersion = '4.0'
jodaTimeVersion = '2.9.2'
servletApiVersion = '3.1.0'
nettyVersion = '4.1.30.Final'
hamcrestVersion = '1.3'
junitVersion = '4.12'
junitDataproviderVersion = '1.9.3'
assertJVersion = '3.5.2'
mockitoVersion = '1.10.8'
slf4jTestVersion = '1.1.0'
guiceVersion = '4.0'
groovyVersion = '2.4.6'
restAssuredVersion = '3.0.2'
codahaleMetricsVersion = '3.1.1'
signalFxCodahaleVersion = '0.0.28'
eurekaClientVersion = '1.3.4'
archaiusVersion = '0.6.5'
typesafeConfigVersion = '1.3.0'
apacheCommonsIoVersion = '2.4'
apacheCommonsCodecVersion = '1.10'
jzlibVersion = '1.1.3'
aaaLibVersion = '2.1.8'
awsS3libVersion = '1.9.40'
// JACOCO PROPERTIES
jacocoToolVersion = '0.7.7.201606060606'
// Anything in this jacocoExclusions list will be excluded from coverage reports.
jacocoExclusions = []
jacocoCoverageThresholdSetup = {
configure(subprojects.findAll { !it.name.startsWith("sample") }) {
jacocoCoverage {
// Enforce minimum code coverage. See https://github.com/palantir/gradle-jacoco-coverage for the full list of options.
reportThreshold 0.8, INSTRUCTION
reportThreshold 0.5, BRANCH
}
}
}
// BINTRAY STUFF
bintrayUser = project.hasProperty('bintrayUser') ? property('bintrayUser') : 'UNDEFINED'
bintrayKey = project.hasProperty('bintrayKey') ? property('bintrayKey') : 'UNDEFINED'
bintrayVersion = "$version"
}
// ========== COMBO TEST REPORT - View the combined/merged report at: [project_root]/build/reports/tests/index.html
apply from: file(rootProject.projectDir.getAbsolutePath() + '/gradle/junitComboTestReport.gradle')
// ========== JACOCO SETUP - View the combined/merged report at: [project_root]/build/reports/jacoco/jacocoRootReport/html/index.html.
// Individual reports for each submodule can be found at: [project_root]/[submodule]/build/reports/jacoco/test/html/index.html
apply from: file(rootProject.projectDir.getAbsolutePath() + '/gradle/jacoco.gradle')
// ========== BINTRAY PUBLISHING
apply from: file(rootProject.projectDir.getAbsolutePath() + '/gradle/bintrayPublishing.gradle')
// ========== MISCELLANEOUS BUILD STUFF
allprojects {
group = groupId // Necessary for the maven install task to function correctly
}