forked from Anibus/mojio-java-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
63 lines (52 loc) · 1.36 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
apply plugin: 'java'
apply plugin: 'jacoco'
ext {
PUBLISH_GROUP_ID = 'io.moj.java'
SOURCE_COMPATIBILITY = 1.7
if (project.hasProperty('publishVersion')) {
println "Version ${publishVersion}"
PUBLISH_VERSION = publishVersion;
} else {
PUBLISH_VERSION = 'SNAPSHOT'
}
}
allprojects {
group PUBLISH_GROUP_ID
version PUBLISH_VERSION
repositories {
jcenter()
mavenCentral()
mavenLocal()
}
}
dependencies {
testCompile 'junit:junit:4.12'
}
task jacocoRootReport(type: JacocoReport, group: 'Reporting') {
description = "Creates a unified Jacoco code coverage report with the execution data for each sub-project"
def sourceDirs = []
def classDirs = []
def executionFiles = []
subprojects.each {
sourceDirs += "${it.projectDir}/src/main"
classDirs += "${it.buildDir}/classes/main"
executionFiles += "${it.buildDir}/jacoco/test.exec"
}
sourceDirectories = files(sourceDirs)
additionalSourceDirs = files(sourceDirs)
classDirectories = files(classDirs)
executionData = files(executionFiles)
reports {
html.enabled = true
xml.enabled = true
csv.enabled = false
}
onlyIf = {
true
}
doFirst {
executionData = files(executionData.findAll {
it.exists()
})
}
}