62 lines
1.5 KiB
Groovy
62 lines
1.5 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'org.springframework.boot' version '3.4.2'
|
|
id 'io.spring.dependency-management' version '1.1.7'
|
|
id 'org.openapi.generator' version '7.11.0'
|
|
}
|
|
|
|
group = 'enseirb'
|
|
version = '0.0.1-SNAPSHOT'
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(21)
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server'
|
|
implementation 'org.springframework.boot:spring-boot-starter-web'
|
|
// swagger Codegen
|
|
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.1.0'
|
|
implementation 'jakarta.validation:jakarta.validation-api:3.0.2'
|
|
implementation 'org.openapitools:jackson-databind-nullable:0.2.6'
|
|
|
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
|
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
|
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
java {
|
|
srcDir "$buildDir/generated/src/main/java"
|
|
}
|
|
}
|
|
}
|
|
sourceSets {
|
|
main {
|
|
java.srcDir("$buildDir/generated/src/main/java")
|
|
}
|
|
}
|
|
|
|
openApiGenerate {
|
|
generatorName.set("spring")
|
|
inputSpec.set("$rootDir/src/main/resources/openapi.yaml")
|
|
outputDir.set("$buildDir/generated")
|
|
apiPackage.set("enseirb.myinpulse.api")
|
|
modelPackage.set("enseirb.myinpulse.model")
|
|
configOptions.put("dateLibrary", "java8")
|
|
configOptions.put("useSpringBoot3", "true")
|
|
//configOptions.put("interfaceOnly", "true")
|
|
configOptions.put("library", "spring-boot")
|
|
}
|
|
|
|
tasks.named('test') {
|
|
useJUnitPlatform()
|
|
}
|