-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
78 lines (68 loc) · 2.01 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import java.time.ZonedDateTime
import java.time.format.DateTimeFormatter
allprojects {
repositories {
mavenLocal()
mavenCentral()
}
}
group = "org.hkurh.doky"
val deployVersion: String by extra {
if (project.hasProperty("deployVersion")) {
project.property("deployVersion") as String
} else {
"Aardvark-v0.1"
}
}
val buildDate: String by extra {
ZonedDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss Z"))
}
plugins {
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.kotlin.plugin.spring)
alias(libs.plugins.kotlin.plugin.jpa) apply false
alias(libs.plugins.spring.boot) apply false
alias(libs.plugins.spring.dependency.management)
alias(libs.plugins.sonarqube)
}
dependencyManagement {
imports {
mavenBom(libs.spring.boot.bom.get().toString())
mavenBom(libs.azure.spring.bom.get().toString())
}
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
subprojects {
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "org.jetbrains.kotlin.plugin.spring")
apply(plugin = "org.jetbrains.kotlin.plugin.jpa")
apply(plugin = "io.spring.dependency-management")
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
val libs = rootProject.extensions.getByType<VersionCatalogsExtension>().named("libs")
dependencies {
implementation(libs.findBundle("logging").get())
testImplementation(libs.findBundle("testing.unit").get())
}
}
val branchName = if (project.hasProperty("branchName")) {
project.property("branchName") as String
} else {
"main"
}
sonar {
properties {
property("sonar.projectKey", "hanna-eismant_doky")
property("sonar.organization", "hanna-eismant")
property("sonar.host.url", "https://sonarcloud.io")
property("sonar.token", System.getenv("SONAR_TOKEN") ?: "default_token_value")
property("sonar.branch.name", branchName)
}
}