@@ -7,6 +7,8 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED
7
7
import org.gradle.api.tasks.testing.logging.TestLogEvent.PASSED
8
8
import org.gradle.api.tasks.testing.logging.TestLogEvent.SKIPPED
9
9
import org.gradle.api.tasks.testing.logging.TestLogEvent.STARTED
10
+ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
11
+ import org.sonarqube.gradle.SonarQubePlugin
10
12
import org.springframework.boot.gradle.plugin.SpringBootPlugin
11
13
import org.springframework.boot.gradle.tasks.bundling.BootJar
12
14
@@ -19,7 +21,6 @@ buildscript {
19
21
}
20
22
}
21
23
22
- @Suppress(" DSL_SCOPE_VIOLATION" )
23
24
plugins {
24
25
kotlin(" jvm" ) version libs.versions.kotlin.get()
25
26
kotlin(" plugin.spring" ) version libs.versions.kotlin.get() apply false
@@ -44,7 +45,6 @@ dependencyManagement {
44
45
}
45
46
46
47
val testModuleDirs = setOf (" common/common-test" , " common/common-persistence-jooq-test" )
47
- val testModules = testModuleDirs.map { it.substringAfter(" /" ) }
48
48
val testPackages = testModuleDirs.map { " $it /**/*" }
49
49
val generatedPackages: Set <String > = setOf (
50
50
" **/ch/difty/scipamato/core/db/**" ,
@@ -54,7 +54,7 @@ val generatedPackages: Set<String> = setOf(
54
54
55
55
testing {
56
56
suites {
57
- @Suppress(" UnstableApiUsage" )
57
+ @Suppress(" UnstableApiUsage" , " unused " )
58
58
val test by getting(JvmTestSuite ::class ) {
59
59
useJUnitJupiter()
60
60
}
@@ -65,10 +65,8 @@ jacoco {
65
65
toolVersion = libs.versions.jacoco.get()
66
66
}
67
67
68
- val jacocoTestReportFile = layout.buildDirectory.get().asFile.resolve(" reports/jacoco/test/jacocoTestReport.xml" )
69
68
val jacocoTestPattern = " **/build/jacoco/*.exec"
70
69
val genPkg = generatedPackages.joinToString(" ," )
71
- val detektReportFile = layout.buildDirectory.get().asFile.resolve(" reports/detekt/detekt.xml" )
72
70
73
71
sonarqube {
74
72
properties {
@@ -77,8 +75,6 @@ sonarqube {
77
75
property(" sonar.organization" , " ursjoss-github" )
78
76
property(" sonar.exclusions" , " **/ch/difty/scipamato/publ/web/themes/markup/html/publ/**/*,$genPkg " )
79
77
property(" sonar.coverage.exclusions" , (generatedPackages + testPackages).joinToString(" ," ))
80
- property(" sonar.coverage.jacoco.xmlReportPaths" , jacocoTestReportFile)
81
- property(" sonar.kotlin.detekt.reportPaths" , detektReportFile)
82
78
}
83
79
}
84
80
@@ -98,6 +94,20 @@ subprojects {
98
94
apply<JavaPlugin >()
99
95
apply<IdeaPlugin >()
100
96
apply<JacocoPlugin >()
97
+ apply<SonarQubePlugin >()
98
+
99
+ sonarqube {
100
+ properties {
101
+ property(
102
+ " sonar.kotlin.detekt.reportPaths" ,
103
+ layout.buildDirectory.get().asFile.resolve(" reports/detekt/detekt.xml" )
104
+ )
105
+ property(
106
+ " sonar.coverage.jacoco.xmlReportPaths" ,
107
+ layout.buildDirectory.get().asFile.resolve(" reports/jacoco/test/jacocoTestReport.xml" )
108
+ )
109
+ }
110
+ }
101
111
102
112
testing {
103
113
suites {
0 commit comments