-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
64 lines (53 loc) · 1.33 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
plugins {
id 'java'
id "jacoco"
id "org.sonarqube" version "3.5.0.2730"
}
group 'cz.tul.fm.jiri_vokrinek.stin_semestral'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
test {
finalizedBy jacocoTestReport // report is always generated after tests run
}
sonarqube {
properties {
property "sonar.projectName", "stin"
property "sonar.projectKey", "Micovec_stin"
property "sonar.organization", "micovec"
property "sonar.host.url", "https://sonarcloud.io"
}
}
subprojects {
// In this place needed only for Jacoco plugin.
apply plugin: "java"
// Code coverage analysis for SonarQube.
apply plugin: "jacoco"
jacoco {
toolVersion = "0.8.7" // Jacoco does not work without specifying a version.
}
jacocoTestReport {
dependsOn test // Tests are required to run before generating the report.
reports {
xml.required = true
csv.required = false
html.required = false
}
afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it, exclude: [
'**/currency/**'
])
}))
}
}
}
jacocoTestReport {
reports {
xml.enabled true
}
}
test {
useJUnitPlatform()
}