-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathbuild.gradle.kts
54 lines (47 loc) · 1.31 KB
/
build.gradle.kts
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
import org.sonarqube.gradle.SonarTask
plugins {
id("org.springframework.boot") version "3.4.1" apply false
id("io.spring.dependency-management") version "1.1.7" apply false
id("application")
id("jacoco-report-aggregation")
id("org.sonarqube") version "5.1.0.4882"
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}
allprojects {
group = "fr.insee.eno"
version = "3.32.1"
}
subprojects {
repositories {
mavenCentral()
maven {
url = uri("https://oss.sonatype.org/content/repositories/snapshots")
mavenContent {
snapshotsOnly()
}
}
mavenLocal()
}
}
sonar {
properties {
// The Jacoco coverage report is aggregated in the eno-ws module
val codeCoveragePath = "$projectDir/eno-ws/build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml"
println("Aggregated code coverage report location:$codeCoveragePath")
property("sonar.coverage.jacoco.xmlReportPaths", codeCoveragePath)
}
}
tasks.named<SonarTask>("sonar") {
dependsOn(tasks.named("testCodeCoverageReport"))
}
tasks.register("printVersion") {
group = "versioning"
description = "Prints the project version"
doLast {
println(project.version)
}
}