All checks were successful
continuous-integration/drone/push Build is passing
Introduced JWT-based authentication with role handling using Keycloak. Added the `/me` endpoint to return user information and roles. Configured testing, Keycloak integration, and public-facing `/public/info` endpoint enhancements.
58 lines
1.6 KiB
Groovy
58 lines
1.6 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'org.springframework.boot' version '3.3.4'
|
|
id 'io.spring.dependency-management' version '1.1.6'
|
|
id 'jacoco'
|
|
}
|
|
|
|
group = 'se.urmo'
|
|
version = '0.0.1-SNAPSHOT'
|
|
java { toolchain { languageVersion = JavaLanguageVersion.of(21) } }
|
|
|
|
repositories { mavenCentral() }
|
|
|
|
dependencies {
|
|
implementation 'org.springframework.boot:spring-boot-starter-security'
|
|
implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server'
|
|
implementation 'org.springframework.security:spring-security-oauth2-jose'
|
|
implementation 'org.springframework.boot:spring-boot-starter-web'
|
|
implementation 'org.springframework.boot:spring-boot-starter-validation'
|
|
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.6.0'
|
|
testImplementation 'org.springframework.security:spring-security-test'
|
|
|
|
runtimeOnly 'org.postgresql:postgresql'
|
|
implementation 'org.flywaydb:flyway-core'
|
|
|
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
|
testImplementation 'org.springframework.security:spring-security-test'
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
finalizedBy jacocoTestReport
|
|
}
|
|
|
|
jacocoTestReport {
|
|
dependsOn test
|
|
reports {
|
|
xml.required = true
|
|
html.required = true
|
|
}
|
|
}
|
|
|
|
jacocoTestCoverageVerification {
|
|
violationRules {
|
|
rule {
|
|
limit {
|
|
counter = 'LINE'
|
|
value = 'COVEREDRATIO'
|
|
minimum = 0.65 // börja rimligt (65%), höj senare
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
check.dependsOn jacocoTestCoverageVerification
|
|
|
|
tasks.test { useJUnitPlatform() }
|