This repository was archived by the owner on Jul 7, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
113 lines (94 loc) · 3.24 KB
/
build.gradle.kts
File metadata and controls
113 lines (94 loc) · 3.24 KB
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.springframework.boot.gradle.tasks.bundling.BootJar
plugins {
kotlin(Plugins.JVM.module) version Plugins.JVM.version
id(Plugins.SPRING_BOOT.module) version Plugins.SPRING_BOOT.version
id(Plugins.SPRING_DEPENDENCY_MANAGEMENT.module) version Plugins.SPRING_DEPENDENCY_MANAGEMENT.version
kotlin(Plugins.KOTLIN_SPRING.module) version Plugins.KOTLIN_SPRING.version
kotlin(Plugins.KOTLIN_JPA.module) version Plugins.KOTLIN_JPA.version
// test fixtures
`java-test-fixtures`
id("jacoco")
id("jacoco-report-aggregation")
id("org.sonarqube") version "5.1.0.4882"
}
allprojects {
group = "com.asap"
version = ""
tasks.withType<JavaCompile> {
sourceCompatibility = Versions.JAVA_VERSION
targetCompatibility = Versions.JAVA_VERSION
}
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = Versions.JAVA_VERSION
}
}
tasks.withType<BootJar> {
enabled = project.name == Versions.ROOT_MODULE
}
repositories {
mavenCentral()
}
apply {
plugin(Plugins.JVM.id)
plugin(Plugins.KOTLIN_SPRING.id)
plugin(Plugins.SPRING_BOOT.id)
plugin(Plugins.SPRING_DEPENDENCY_MANAGEMENT.id)
plugin(Plugins.TEST_FIXTURES.id)
plugin("jacoco")
plugin("jacoco-report-aggregation")
plugin("org.sonarqube")
}
dependencies {
implementation(Dependencies.Spring.BOOT)
implementation(Dependencies.Kotlin.KOTLIN_REFLECT)
testImplementation(Dependencies.Spring.TEST)
testFixturesImplementation(Dependencies.Spring.TEST)
testRuntimeOnly(Dependencies.Junit.JUNIT_LAUNCHER)
testImplementation(Dependencies.Kotlin.KOTLIN_TEST_JUNIT5)
testFixturesImplementation(Dependencies.Kotlin.KOTLIN_TEST_JUNIT5)
testImplementation(Dependencies.Kotest.KOTEST_RUNNER)
testImplementation(Dependencies.Kotest.KOTEST_ASSERTIONS_CORE)
testImplementation(Dependencies.Kotest.KOTEST_PROPERTY)
testImplementation(Dependencies.Mockk.MOCKK)
implementation(Dependencies.Jackson.KOTLIN)
implementation(Dependencies.Jackson.JAVA_TIME)
implementation(Dependencies.Logger.KOTLIN_OSHAI)
implementation(Dependencies.Instancio.CORE)
implementation(Dependencies.Instancio.JUNIT)
}
kotlin {
compilerOptions {
freeCompilerArgs.addAll("-Xjsr305=strict")
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
jacoco {
toolVersion = "0.8.7"
}
}
tasks.testCodeCoverageReport {
reports {
xml.required = true
}
}
dependencies {
allprojects.forEach {
add("jacocoAggregation", project(it.path))
}
}
sonar {
properties {
property("sonar.projectKey", "ASAP-Lettering_Lettering-Backend")
property("sonar.organization", "asap-lettering")
property("sonar.host.url", "https://sonarcloud.io")
property("sonar.java.coveragePlugin", "jacoco")
property(
"sonar.coverage.jacoco.xmlReportPaths",
rootProject.layout.buildDirectory.file("reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml"),
)
}
}