-
Notifications
You must be signed in to change notification settings - Fork 52
/
build.gradle
68 lines (56 loc) · 1.74 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
plugins {
id 'java'
id 'maven-publish'
id 'org.jetbrains.kotlin.plugin.serialization' version '1.9.24'
id 'org.jetbrains.kotlin.jvm' version '1.9.24'
id 'jacoco'
id "org.sonarqube" version "5.1.0.4882"
}
allprojects {
repositories {
mavenLocal()
mavenCentral()
}
}
subprojects {
def versionPropsFile = file('../version.properties')
Properties versionProps = new Properties()
versionProps.load(new FileInputStream(versionPropsFile))
def versionInfo = versionProps['version']
println("Version: $versionInfo")
version versionInfo
}
tasks.register('codeCoverageReport', JacocoReport) {
// Gather execution data from all subprojects
executionData fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")
// Add all relevant sourcesets from the subprojects
subprojects.each {
if (!it.name.startsWith("spring-")) {
sourceSets it.sourceSets.main
}
}
reports {
xml.required = true
html.required = true
csv.required = false
}
}
codeCoverageReport.dependsOn {
subprojects.findAll {!it.name.startsWith("spring-")}.test
}
sonarqube {
properties {
property "sonar.projectKey", "znsio_specmatic"
property "sonar.organization", "znsio"
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.coverage.jacoco.xmlReportPaths", "${rootDir}/build/reports/jacoco/codeCoverageReport/codeCoverageReport.xml"
property "sonar.coverage.exclusions", "**/application/src/**,**/junit5-support/src/**"
property "sonar.exclusions", "**/*Bean?."
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
repositories {
mavenCentral()
}