mirror of
https://github.com/Dannecron/spring-boot-demo.git
synced 2025-12-25 16:22:35 +03:00
move repositories to separate db package
replace jacoco with kover
This commit is contained in:
@@ -1,40 +1,85 @@
|
||||
plugins {
|
||||
idea
|
||||
alias(libs.plugins.kotlin.kover)
|
||||
alias(libs.plugins.kotlin.jpa)
|
||||
alias(libs.plugins.kotlin.jvm)
|
||||
alias(libs.plugins.kotlin.serialization)
|
||||
alias(libs.plugins.kotlin.spring)
|
||||
alias(libs.plugins.spring.boot)
|
||||
alias(libs.plugins.spring.dependencyManagement)
|
||||
|
||||
jacoco
|
||||
}
|
||||
|
||||
group = "com.github.dannecron.demo"
|
||||
version = "single-version"
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
allprojects {
|
||||
apply {
|
||||
plugin(rootProject.libs.plugins.kotlin.jvm.get().pluginId)
|
||||
plugin(rootProject.libs.plugins.kotlin.serialization.get().pluginId)
|
||||
plugin(rootProject.libs.plugins.kotlin.kover.get().pluginId)
|
||||
|
||||
plugin("java")
|
||||
}
|
||||
|
||||
plugins.withId("org.jetbrains.kotlinx.kover") {
|
||||
tasks.named("koverXmlReport") {
|
||||
dependsOn(tasks.test)
|
||||
}
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
kotlin {
|
||||
compilerOptions {
|
||||
freeCompilerArgs.addAll("-Xjsr305=strict")
|
||||
apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_1)
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(rootProject.libs.kotlin.reflect)
|
||||
implementation(rootProject.libs.kotlinx.serialization.json)
|
||||
implementation(rootProject.libs.spring.aspects)
|
||||
|
||||
testImplementation(rootProject.libs.kotlin.test.junit)
|
||||
testImplementation(rootProject.libs.mockito.kotlin)
|
||||
testImplementation(rootProject.libs.spring.boot.starter.test)
|
||||
|
||||
kover(project(":db"))
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
useJUnitPlatform()
|
||||
finalizedBy("koverXmlReport")
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
subprojects {
|
||||
apply {
|
||||
plugin(rootProject.libs.plugins.kotlin.spring.get().pluginId)
|
||||
plugin(rootProject.libs.plugins.spring.boot.get().pluginId)
|
||||
plugin(rootProject.libs.plugins.spring.dependencyManagement.get().pluginId)
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(project(":db"))
|
||||
|
||||
runtimeOnly(libs.micrometer.registry.prometheus)
|
||||
|
||||
implementation(libs.bundles.tracing)
|
||||
implementation(libs.flyway.core)
|
||||
implementation(libs.jackson.datatype.jsr)
|
||||
implementation(libs.jackson.module.kotlin)
|
||||
implementation(libs.json.schema.validator)
|
||||
implementation(libs.kotlin.reflect)
|
||||
implementation(libs.kotlinx.serialization.json)
|
||||
implementation(libs.ktor.client.cio)
|
||||
implementation(libs.ktor.client.core)
|
||||
implementation(libs.logback.encoder)
|
||||
implementation(libs.postgres)
|
||||
implementation(libs.spring.aspects)
|
||||
implementation(libs.spring.boot.starter.actuator)
|
||||
implementation(libs.spring.boot.starter.jdbc)
|
||||
implementation(libs.spring.boot.starter.mustache)
|
||||
@@ -43,33 +88,10 @@ dependencies {
|
||||
implementation(libs.spring.doc.openapi.starter)
|
||||
implementation(libs.spring.kafka)
|
||||
|
||||
testImplementation(libs.kotlin.test.junit)
|
||||
testImplementation(libs.mockito.kotlin)
|
||||
testImplementation(libs.spring.boot.starter.test)
|
||||
testImplementation(libs.spring.kafka.test)
|
||||
testImplementation(libs.testcontainers)
|
||||
testImplementation(libs.testcontainers.junit.jupiter)
|
||||
testImplementation(libs.testcontainers.postgresql)
|
||||
testImplementation(libs.ktor.client.mock)
|
||||
|
||||
developmentOnly(libs.spring.boot.devtools)
|
||||
}
|
||||
|
||||
kotlin {
|
||||
compilerOptions {
|
||||
freeCompilerArgs.addAll("-Xjsr305=strict")
|
||||
apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_1)
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
finalizedBy(tasks.jacocoTestReport) // report is always generated after tests run
|
||||
}
|
||||
|
||||
tasks.jacocoTestReport {
|
||||
dependsOn(tasks.test) // tests are required to run before generating the report
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user