Compare commits
2 Commits
26a6f065da
...
95f866cd78
Author | SHA1 | Date | |
---|---|---|---|
|
95f866cd78 | ||
|
91ef88d8c9 |
1
.idea/gradle.xml
generated
1
.idea/gradle.xml
generated
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
|
@ -1,6 +1,7 @@
|
||||
plugins {
|
||||
kotlin("jvm") version "2.0.21"
|
||||
id("org.openapi.generator") version "7.10.0"
|
||||
id("maven-publish")
|
||||
}
|
||||
|
||||
group = "ru.vyatsu"
|
||||
@ -12,9 +13,17 @@ repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
// TODO: Нужно присобачить bom
|
||||
dependencies {
|
||||
compileOnly("com.squareup.okhttp3:okhttp:4.12.0")
|
||||
compileOnly("com.squareup.moshi:moshi-kotlin:1.15.2")
|
||||
compileOnly("org.springframework.boot:spring-boot-autoconfigure:3.4.1")
|
||||
compileOnly("org.springframework.boot:spring-boot-starter-web:3.4.1")
|
||||
compileOnly("org.springframework.boot:spring-boot-starter-validation:3.4.1")
|
||||
compileOnly("jakarta.servlet:jakarta.servlet-api:6.1.0")
|
||||
compileOnly("io.swagger.core.v3:swagger-annotations:2.2.27")
|
||||
compileOnly("io.swagger.core.v3:swagger-models:2.2.27")
|
||||
|
||||
testImplementation(kotlin("test"))
|
||||
}
|
||||
|
||||
@ -27,10 +36,14 @@ kotlin {
|
||||
}
|
||||
|
||||
tasks.openApiGenerate {
|
||||
generatorName.set("kotlin")
|
||||
generatorName.set("kotlin-spring")
|
||||
inputSpec.set("$rootDir/src/main/resources/openapi-contract.yaml")
|
||||
outputDir.set(generatedSourcesDir)
|
||||
packageName.set("ru.vyatsu")
|
||||
configOptions.put("interfaceOnly", "true")
|
||||
configOptions.put("useSpringBoot3", "true")
|
||||
configOptions.put("useBeanValidation", "false")
|
||||
configOptions.put("useSwaggerUI", "false")
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
@ -43,4 +56,13 @@ sourceSets {
|
||||
|
||||
tasks.compileKotlin {
|
||||
dependsOn(tasks.openApiGenerate)
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
create<MavenPublication>("maven") {
|
||||
from(components["kotlin"])
|
||||
artifactId = tasks.jar.get().archiveBaseName.get()
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user