Skip to content

Commit

Permalink
FDP-2607: add jacoco
Browse files Browse the repository at this point in the history
Signed-off-by: Loes Immens <[email protected]>
  • Loading branch information
loesimmens committed Sep 23, 2024
1 parent 8f83796 commit ba4e037
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
3 changes: 3 additions & 0 deletions application/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ dependencies {
implementation("org.springframework:spring-aspects")

runtimeOnly("io.micrometer:micrometer-registry-prometheus")

// Generate test and integration test reports
jacocoAggregation(project(":application"))
}

tasks.withType<org.springframework.boot.gradle.tasks.bundling.BootBuildImage> {
Expand Down
18 changes: 8 additions & 10 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// SPDX-License-Identifier: Apache-2.0

import io.spring.gradle.dependencymanagement.internal.dsl.StandardDependencyManagementExtension
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension

plugins {
id("org.springframework.boot") version "3.3.4" apply false
Expand Down Expand Up @@ -32,6 +32,8 @@ subprojects {
apply(plugin = "io.spring.dependency-management")
apply(plugin = "org.jetbrains.kotlin.plugin.jpa")
apply(plugin = "eclipse")
apply(plugin = "jacoco")
apply(plugin = "jacoco-report-aggregation")

group = "org.gxf.template"
version = rootProject.version
Expand All @@ -48,22 +50,18 @@ subprojects {
}
}

extensions.configure<JavaPluginExtension> {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}

extensions.configure<StandardDependencyManagementExtension> {
imports {
mavenBom(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)
}
}

tasks.withType<KotlinCompile> {
kotlinOptions {
extensions.configure<KotlinJvmProjectExtension> {
jvmToolchain {
languageVersion = JavaLanguageVersion.of(21)
}
compilerOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "21"
}
}

Expand Down

0 comments on commit ba4e037

Please sign in to comment.