fixing Tracer-Bullet_Backend-Infrastruktur
This commit is contained in:
parent
1db41a5c62
commit
4f67379b42
122
build.gradle.kts
122
build.gradle.kts
|
|
@ -1,45 +1,60 @@
|
|||
import java.util.Locale
|
||||
|
||||
// Defines plugins that are available to all subprojects.
|
||||
// `apply false` means the plugin is not applied to the root project itself.
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.jvm) apply false
|
||||
alias(libs.plugins.kotlin.multiplatform) apply false
|
||||
alias(libs.plugins.compose.multiplatform) apply false
|
||||
alias(libs.plugins.compose.compiler) apply false
|
||||
alias(libs.plugins.spring.boot) apply false
|
||||
alias(libs.plugins.spring.dependencyManagement) apply false
|
||||
}
|
||||
|
||||
// Common configuration for all subprojects in this build.
|
||||
subprojects {
|
||||
// Enforce Java 21 for all Kotlin compilation tasks.
|
||||
|
||||
// Wende gemeinsame Einstellungen an
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
|
||||
compilerOptions {
|
||||
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21)
|
||||
}
|
||||
}
|
||||
|
||||
// Configure all test tasks to use the JUnit Platform (for JUnit 5).
|
||||
tasks.withType<Test>().configureEach {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
}
|
||||
|
||||
// Documentation generation tasks
|
||||
// ##################################################################
|
||||
// ### IHRE DOKUMENTATIONS-TASKS ###
|
||||
// ##################################################################
|
||||
|
||||
// Abstrakte Klasse für die Custom Task (Best Practice)
|
||||
abstract class ValidateDocumentationTask @Inject constructor(
|
||||
private val execOperations: ExecOperations
|
||||
) : DefaultTask() {
|
||||
|
||||
@TaskAction
|
||||
fun validate() {
|
||||
println("🔍 Validating documentation...")
|
||||
execOperations.exec {
|
||||
commandLine("./scripts/validation/validate-docs.sh")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Registrierung der Tasks
|
||||
tasks.register<ValidateDocumentationTask>("validateDocumentation") {
|
||||
description = "Validates documentation completeness and consistency"
|
||||
group = "documentation"
|
||||
}
|
||||
|
||||
tasks.register("generateOpenApiDocs") {
|
||||
description = "Generates OpenAPI documentation from all API modules"
|
||||
group = "documentation"
|
||||
|
||||
doLast {
|
||||
println("🔧 Generating OpenAPI documentation...")
|
||||
|
||||
val apiModules = listOf(
|
||||
"members:members-api",
|
||||
"horses:horses-api",
|
||||
"events:events-api",
|
||||
"masterdata:masterdata-api"
|
||||
)
|
||||
|
||||
// Create docs/api/generated directory
|
||||
val outputDir = file("docs/api/generated")
|
||||
outputDir.mkdirs()
|
||||
|
||||
|
|
@ -47,72 +62,45 @@ tasks.register("generateOpenApiDocs") {
|
|||
val moduleName = module.split(":").last().replace("-api", "")
|
||||
println("📝 Processing $moduleName API...")
|
||||
|
||||
// Generate OpenAPI spec for each module
|
||||
val specFile = file("$outputDir/${moduleName}-openapi.json")
|
||||
specFile.writeText("""
|
||||
{
|
||||
"openapi": "3.0.3",
|
||||
"info": {
|
||||
"title": "${moduleName.replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString() }} API",
|
||||
"description": "REST API for ${moduleName} management",
|
||||
"version": "1.0.0",
|
||||
"contact": {
|
||||
"name": "Meldestelle Development Team"
|
||||
}
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "http://localhost:8080",
|
||||
"description": "Development server"
|
||||
},
|
||||
{
|
||||
"url": "https://api.meldestelle.at",
|
||||
"description": "Production server"
|
||||
}
|
||||
],
|
||||
"paths": {},
|
||||
"components": {
|
||||
"securitySchemes": {
|
||||
"bearerAuth": {
|
||||
"type": "http",
|
||||
"scheme": "bearer",
|
||||
"bearerFormat": "JWT"
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearerAuth": []
|
||||
}
|
||||
]
|
||||
}
|
||||
""".trimIndent())
|
||||
specFile.writeText(
|
||||
"""
|
||||
{
|
||||
"openapi": "3.0.3",
|
||||
"info": {
|
||||
"title": "${moduleName.replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString() }} API",
|
||||
"description": "REST API for $moduleName management",
|
||||
"version": "1.0.0",
|
||||
"contact": {
|
||||
"name": "Meldestelle Development Team"
|
||||
}
|
||||
},
|
||||
"servers": [
|
||||
{ "url": "http://localhost:8080", "description": "Development server" },
|
||||
{ "url": "https://api.meldestelle.at", "description": "Production server" }
|
||||
],
|
||||
"paths": {},
|
||||
"components": {
|
||||
"securitySchemes": {
|
||||
"bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" }
|
||||
}
|
||||
},
|
||||
"security": [ { "bearerAuth": [] } ]
|
||||
}
|
||||
""".trimIndent()
|
||||
)
|
||||
}
|
||||
|
||||
println("✅ OpenAPI documentation generated in docs/api/generated/")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("validateDocumentation") {
|
||||
description = "Validates documentation completeness and consistency"
|
||||
group = "documentation"
|
||||
|
||||
doLast {
|
||||
println("🔍 Validating documentation...")
|
||||
exec {
|
||||
commandLine("./scripts/validation/validate-docs.sh")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("generateAllDocs") {
|
||||
description = "Generates all documentation (API docs + validation)"
|
||||
group = "documentation"
|
||||
|
||||
dependsOn("generateOpenApiDocs", "validateDocumentation")
|
||||
}
|
||||
|
||||
// Wrapper task configuration for the root project
|
||||
// Wrapper-Konfiguration
|
||||
tasks.wrapper {
|
||||
gradleVersion = "8.14"
|
||||
distributionType = Wrapper.DistributionType.BIN
|
||||
|
|
|
|||
15
core/core-utils/src/main/resources/logback.xml
Normal file
15
core/core-utils/src/main/resources/logback.xml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<configuration>
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<root level="info">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</root>
|
||||
|
||||
<logger name="at.mocode" level="debug" additivity="false">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</logger>
|
||||
</configuration>
|
||||
|
|
@ -50,7 +50,7 @@ testcontainers = "1.19.6"
|
|||
# --- Utilities ---
|
||||
uuid = "0.8.4"
|
||||
bignum = "0.3.9"
|
||||
logback = "1.5.6"
|
||||
logback = "1.5.13"
|
||||
caffeine = "3.1.8"
|
||||
reactorKafka = "1.3.22"
|
||||
jackson = "2.17.0"
|
||||
|
|
|
|||
|
|
@ -1,34 +1,3 @@
|
|||
/*
|
||||
// Multiplatform
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
js(IR) {
|
||||
browser()
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
val commonMain by getting {
|
||||
dependencies {
|
||||
api(libs.kotlinx.coroutines.core)
|
||||
api(libs.kotlinx.serialization.json)
|
||||
api(libs.kotlinx.datetime)
|
||||
}
|
||||
}
|
||||
|
||||
val jvmMain by getting {
|
||||
dependencies {
|
||||
api(libs.kotlin.logging.jvm)
|
||||
api(libs.kotlinx.coroutines.reactor)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// Dieses Modul ist ein reines "Sammelmodul".
|
||||
// Es hat keinen eigenen Code, sondern bündelt nur gemeinsame Laufzeit-Abhängigkeiten,
|
||||
// die von den meisten JVM-Modulen benötigt werden.
|
||||
|
|
@ -47,4 +16,5 @@ dependencies {
|
|||
api(libs.kotlinx.datetime)
|
||||
api(libs.kotlin.logging.jvm)
|
||||
api(libs.kotlinx.coroutines.reactor)
|
||||
api(libs.logback.classic)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,44 +1,3 @@
|
|||
/*
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
js(IR) {
|
||||
browser()
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
val commonTest by getting {
|
||||
dependencies {
|
||||
implementation(kotlin("test"))
|
||||
api(libs.kotlinx.coroutines.test)
|
||||
}
|
||||
}
|
||||
|
||||
val jvmTest by getting {
|
||||
dependencies {
|
||||
api(libs.junit.jupiter.api)
|
||||
api(libs.junit.jupiter.engine)
|
||||
api(libs.junit.jupiter.params)
|
||||
api(libs.junit.platform.launcher)
|
||||
|
||||
api(libs.mockk)
|
||||
api(libs.assertj.core)
|
||||
api(libs.spring.boot.starter.test)
|
||||
api(libs.h2.driver)
|
||||
|
||||
api(libs.testcontainers.core)
|
||||
api(libs.testcontainers.junit.jupiter)
|
||||
api(libs.testcontainers.postgresql)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
// Dieses Modul bündelt alle für JVM-Tests notwendigen Abhängigkeiten.
|
||||
// Jedes Modul, das Tests enthält, sollte dieses Modul mit `testImplementation` einbinden.
|
||||
plugins {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user