Files
gremiumhub/legalconsenthub-backend/build.gradle
2025-02-21 08:26:58 +01:00

78 lines
2.5 KiB
Groovy

plugins {
id 'org.jetbrains.kotlin.jvm' version '1.9.25'
id 'org.jetbrains.kotlin.plugin.spring' version '1.9.25'
id 'org.springframework.boot' version '3.4.2'
id 'io.spring.dependency-management' version '1.1.7'
id 'org.jetbrains.kotlin.plugin.jpa' version '1.9.25'
id 'org.openapi.generator' version '7.11.0'
}
group = 'com.betriebsratkanzlei'
version = '0.0.1-SNAPSHOT'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'com.fasterxml.jackson.module:jackson-module-kotlin'
implementation 'org.jetbrains.kotlin:kotlin-reflect'
implementation 'org.liquibase:liquibase-core'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.4'
implementation 'org.springdoc:springdoc-openapi-ui:1.8.0'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
runtimeOnly 'com.h2database:h2'
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit5'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
kotlin {
compilerOptions {
freeCompilerArgs.addAll '-Xjsr305=strict'
}
}
allOpen {
annotation 'jakarta.persistence.Entity'
annotation 'jakarta.persistence.MappedSuperclass'
annotation 'jakarta.persistence.Embeddable'
}
def generatedSourcesServerLegalconsenthubDir = "$buildDir/generated/server".toString()
sourceSets {
main {
kotlin.srcDirs += generatedSourcesServerLegalconsenthubDir + '/src/main/kotlin'
}
}
tasks.named('test') {
useJUnitPlatform()
}
task generate_legalconsenthub_server(type: org.openapitools.generator.gradle.plugin.tasks.GenerateTask) {
generatorName = 'kotlin-spring'
inputSpec = "$rootDir/api/legalconsenthub.yml".toString()
outputDir = generatedSourcesServerLegalconsenthubDir
apiPackage = 'com.betriebsratkanzlei.legalconsenthub_api.api'
modelPackage = 'com.betriebsratkanzlei.legalconsenthub_api.model'
groupId = 'com.betriebsratkanzlei'
id = 'legalconsenthub_api'
configOptions = [useTags : 'true',
enumPropertyNaming: 'original',
interfaceOnly : 'true',
useSpringBoot3 : 'true']
typeMappings = [DateTime: "LocalDateTime"]
importMappings = [LocalDateTime: "java.time.LocalDateTime"]
}
compileKotlin.dependsOn(tasks.generate_legalconsenthub_server)