-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.gradle
62 lines (52 loc) · 1.76 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
allprojects {
apply plugin: 'eclipse'
apply plugin: 'idea'
tasks.withType(JavaCompile).all { JavaCompile compile ->
compile.options.compilerArgs = [
"-Xlint:deprecation"
]
}
}
subprojects {
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}
// Put the build dir into the rootProject
buildDir = "../build/$name"
plugins.withType(JavaPlugin) {
tasks.withType(Test) {
useJUnit()
// Exclude tests (ex. gradle test -Pexclude=SomeTestClass)
def excludedTests = project.properties['exclude']
if (excludedTests) {
excludedTests.replaceAll('\\s', '').split('[,]').each {
exclude "**/${it}.class"
}
}
afterSuite { desc, result ->
if (!desc.parent) {
println ":${project.name} -- Executed ${result.testCount} tests: ${result.successfulTestCount} succeeded, ${result.failedTestCount} failed, ${result.skippedTestCount} skipped"
}
}
// Forward standard out from child JVMs to the console
testLogging {
showStackTraces = true
showStandardStreams = true
showExceptions = true
showCauses = true
displayGranularity = maxGranularity
exceptionFormat = 'full'
}
minHeapSize = "1G"
maxHeapSize = "4G"
}
}
idea {
module {
testSourceDirs += file('src/test/java')
}
}
// This task allows to get the dependencies for all the sub-projects from the main directory
task allDeps(type: DependencyReportTask) {}
}