LF8/build.gradle.kts
Jan Gleytenhoover a0286d5047
Some checks failed
Build / Build and analyze (push) Failing after 32s
Quality Check / Tests (pull_request) Failing after 24s
Quality Check / Checkstyle Main (pull_request) Failing after 22s
Update build.gradle.kts
2024-09-25 15:00:43 +00:00

80 lines
2.1 KiB
Plaintext

plugins {
java
id("org.springframework.boot") version "3.3.4"
id("io.spring.dependency-management") version "1.1.6"
id("checkstyle")
id("org.sonarqube") version "5.0.0.4638"
id("jacoco")
}
tasks.jacocoTestReport {
dependsOn(tasks.test) // Ensure tests are run before generating the report
reports {
xml.isEnabled = true // Enable XML report
html.isEnabled = true // Enable HTML report
}
}
sonar {
properties {
property("sonar.projectKey", "LF8")
property("sonar.projectName", "LF8")
}
}
tasks.withType<Checkstyle> {
reports {
// Disable HTML report
html.required.set(false)
// Disable XML report
xml.required.set(false)
}
}
group = "de.szut"
version = "0.0.1-SNAPSHOT"
tasks.test {
useJUnitPlatform()
// Activate the 'test' profile for Spring during tests
systemProperty("spring.profiles.active", "test")
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
configurations {
compileOnly {
extendsFrom(configurations.annotationProcessor.get())
}
}
repositories {
mavenCentral()
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-validation")
compileOnly("org.projectlombok:lombok")
annotationProcessor("org.projectlombok:lombok")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.boot:spring-boot-starter-oauth2-resource-server:3.3.4")
implementation("org.springframework.boot:spring-boot-starter-oauth2-client:3.3.4")
runtimeOnly("org.postgresql:postgresql")
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.6.0")
testImplementation("com.h2database:h2")
}
tasks.withType<Test> {
useJUnitPlatform()
finalizedBy(tasks.jacocoTestReport) // Run JaCoCo report after tests
}