-
Notifications
You must be signed in to change notification settings - Fork 147
/
build.gradle
76 lines (62 loc) · 2.08 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
apply plugin: 'version'
apply plugin: 'idea'
allprojects {
group = 'com.linkedin.pygradle'
}
ext {
startTime = System.currentTimeMillis()
}
subprojects {
apply plugin: 'idea'
apply plugin: 'java'
buildDir = new File(rootProject.buildDir, path.replace(":", File.separator).substring(0))
task downloadDependencies {
description = 'Download all dependencies to help with CI cacheing'
group = 'CI'
doLast {
//noinspection GroovyAssignabilityCheck
configurations.findAll { it.isCanBeResolved() }.each { conf ->
conf.files
}
}
}
tasks.withType(Test) { task ->
if (gradle.startParameter.consoleOutput == ConsoleOutput.Plain) { //on ci we will see tests as they run
task.afterTest { TestDescriptor td, TestResult tr ->
logger.lifecycle("[${tr.resultType}] - ${td.className}#${td.name}")
}
task.testLogging.exceptionFormat = 'full'
}
task.minHeapSize = '128m'
task.maxHeapSize = '512m'
task.afterSuite { desc, result ->
if (!desc.parent) { // will match the outermost suite
logger.lifecycle("Task {} results: {} ({} tests, {} successes, {} failures, {} skipped)", task.path,
result.resultType, result.testCount, result.successfulTestCount, result.failedTestCount, result.skippedTestCount)
}
}
}
tasks.matching { it instanceof JavaCompile || it instanceof GroovyCompile }.all {
it.options.compilerArgs += ['-Xlint:deprecation']
}
idea {
module {
excludeDirs += buildDir
}
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
/* temporarily disable to fit in CI memory limit
afterEvaluate {
project.tasks.withType(FindBugs)
.matching { it.name != 'findbugsMain' }
.each { it.enabled = false }
}
*/
}
idea {
project {
jdkName = '1.8'
languageLevel = '1.8'
}
}