Skip to content

Commit

Permalink
Merge branch 'split-openapi-and-swagger-ui' into pre-release-5-0-0
Browse files Browse the repository at this point in the history
  • Loading branch information
SMILEY4 committed Jan 9, 2025
2 parents 3bcb672 + c9d562b commit 58de52b
Show file tree
Hide file tree
Showing 145 changed files with 1,859 additions and 1,658 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
.gradle
.kotlin
build
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
id("org.owasp.dependencycheck") version "8.2.1" apply false
id("io.gitlab.arturbosch.detekt") version "1.23.0" apply false
id("com.vanniktech.maven.publish") version "0.28.0" apply false
id("com.github.ben-manes.versions") version "0.51.0" apply false
}

repositories {
Expand Down
7 changes: 2 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ kotlin.code.style=official

# project id
projectGroupId=io.github.smiley4
projectArtifactIdBase=ktor-swagger-ui
projectVersion=4.2.0
projectVersion=5.0.0-beta.1

# publishing information
projectNameBase=Ktor Swagger UI
projectDescriptionBase=Ktor plugin to document routes and provide a Swagger-UI
# common publishing information
projectScmUrl=https://github.com/SMILEY4/ktor-swagger-ui
projectScmConnection=scm:git:git://github.com/SMILEY4/ktor-swagger-ui.git
projectLicenseName=The Apache License, Version 2.0
Expand Down
124 changes: 124 additions & 0 deletions ktor-openapi/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
import com.vanniktech.maven.publish.JavadocJar
import com.vanniktech.maven.publish.KotlinJvm
import com.vanniktech.maven.publish.SonatypeHost
import io.gitlab.arturbosch.detekt.Detekt

val projectGroupId: String by project
val projectVersion: String by project
group = projectGroupId
version = projectVersion

plugins {
kotlin("jvm")
id("org.owasp.dependencycheck")
id("com.github.ben-manes.versions")
id("io.gitlab.arturbosch.detekt")
id("com.vanniktech.maven.publish")
id("org.jetbrains.dokka")
}

repositories {
mavenCentral()
}

dependencies {

val versionKtor: String by project
implementation("io.ktor:ktor-server-core-jvm:$versionKtor")
implementation("io.ktor:ktor-server-auth:$versionKtor")
implementation("io.ktor:ktor-server-resources:$versionKtor")
testImplementation("io.ktor:ktor-server-netty-jvm:$versionKtor")
testImplementation("io.ktor:ktor-server-content-negotiation:$versionKtor")
testImplementation("io.ktor:ktor-serialization-jackson:$versionKtor")
testImplementation("io.ktor:ktor-server-auth:$versionKtor")
testImplementation("io.ktor:ktor-server-call-logging:$versionKtor")
testImplementation("io.ktor:ktor-server-test-host:$versionKtor")

val versionSwaggerParser: String by project
implementation("io.swagger.parser.v3:swagger-parser:$versionSwaggerParser")

val versionJackson: String by project
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$versionJackson")

val versionSchemaKenerator: String by project
implementation("io.github.smiley4:schema-kenerator-core:$versionSchemaKenerator")
implementation("io.github.smiley4:schema-kenerator-reflection:$versionSchemaKenerator")
implementation("io.github.smiley4:schema-kenerator-swagger:$versionSchemaKenerator")

val versionKotlinLogging: String by project
implementation("io.github.oshai:kotlin-logging-jvm:$versionKotlinLogging")

val versionKotest: String by project
testImplementation("io.kotest:kotest-runner-junit5:$versionKotest")
testImplementation("io.kotest:kotest-assertions-core:$versionKotest")

val versionKotlinTest: String by project
testImplementation("org.jetbrains.kotlin:kotlin-test:$versionKotlinTest")

val versionMockk: String by project
testImplementation("io.mockk:mockk:$versionMockk")

}

kotlin {
jvmToolchain(11)
}

tasks.withType<Test>().configureEach {
useJUnitPlatform()
}

detekt {
ignoreFailures = false
buildUponDefaultConfig = true
allRules = false
config.setFrom("$projectDir/../detekt/detekt.yml")
}
tasks.withType<Detekt>().configureEach {
reports {
html.required.set(true)
md.required.set(true)
xml.required.set(false)
txt.required.set(false)
sarif.required.set(false)
}
}

mavenPublishing {
val projectGroupId: String by project
val projectVersion: String by project
val projectScmUrl: String by project
val projectScmConnection: String by project
val projectLicenseName: String by project
val projectLicenseUrl: String by project
val projectDeveloperName: String by project
val projectDeveloperUrl: String by project

configure(KotlinJvm(JavadocJar.Dokka("dokkaHtml"), true))
publishToMavenCentral(SonatypeHost.S01)
signAllPublications()
coordinates(projectGroupId, "ktor-openapi", projectVersion)
pom {
name.set("Ktor OpenApi")
description.set("Ktor plugin to automatically generate and provide OpenApi")
url.set(projectScmUrl)
licenses {
license {
name.set(projectLicenseName)
url.set(projectLicenseUrl)
distribution.set(projectLicenseUrl)
}
}
scm {
url.set(projectScmUrl)
connection.set(projectScmConnection)
}
developers {
developer {
id.set(projectDeveloperName)
name.set(projectDeveloperName)
url.set(projectDeveloperUrl)
}
}
}
}
Loading

0 comments on commit 58de52b

Please sign in to comment.