forked from OpenAPITools/openapi-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Kotlin Server] Update Ktor to latest version; move config to kts
- Loading branch information
Showing
17 changed files
with
188 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
...enapi-generator/src/main/resources/kotlin-server/libraries/ktor/build.gradle.kts.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
|
||
val kotlin_version: String by project | ||
val logback_version: String by project | ||
|
||
group = "{{groupId}}" | ||
version = "{{artifactVersion}}" | ||
|
||
plugins { | ||
kotlin("jvm") version "2.0.20" | ||
id("io.ktor.plugin") version "2.3.12" | ||
} | ||
|
||
application { | ||
mainClass.set("io.ktor.server.netty.EngineMain") | ||
val isDevelopment: Boolean = project.ext.has("development") | ||
applicationDefaultJvmArgs = listOf("-Dio.ktor.development=$isDevelopment") | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation("ch.qos.logback:logback-classic:$logback_version") | ||
{{#hasAuthMethods}} | ||
implementation("com.typesafe:config:1.4.1") | ||
{{/hasAuthMethods}} | ||
implementation("io.ktor:ktor-server-auth") | ||
{{#hasAuthMethods}} | ||
implementation("io.ktor:ktor-client-apache") | ||
{{/hasAuthMethods}} | ||
{{#featureAutoHead}} | ||
implementation("io.ktor:ktor-server-auto-head-response") | ||
{{/featureAutoHead}} | ||
implementation("io.ktor:ktor-server-default-headers") | ||
implementation("io.ktor:ktor-server-content-negotiation") | ||
implementation("io.ktor:ktor-serialization-gson") | ||
{{#featureResources}} | ||
implementation("io.ktor:ktor-server-resources") | ||
{{/featureResources}} | ||
{{#featureHSTS}} | ||
implementation("io.ktor:ktor-server-hsts") | ||
{{/featureHSTS}} | ||
{{#featureCORS}} | ||
implementation("io.ktor:ktor-server-cors") | ||
{{/featureCORS}} | ||
{{#featureConditionalHeaders}} | ||
implementation("io.ktor:ktor-server-conditional-headers") | ||
{{/featureConditionalHeaders}} | ||
{{#featureCompression}} | ||
implementation("io.ktor:ktor-server-compression") | ||
{{/featureCompression}} | ||
{{#featureMetrics}} | ||
implementation("io.dropwizard.metrics:metrics-core:4.1.18") | ||
implementation("io.ktor:ktor-server-metrics") | ||
{{/featureMetrics}} | ||
implementation("io.ktor:ktor-server-netty") | ||
|
||
testImplementation("org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version") | ||
} |
96 changes: 0 additions & 96 deletions
96
...s/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/build.gradle.mustache
This file was deleted.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
...enapi-generator/src/main/resources/kotlin-server/libraries/ktor/gradle-wrapper.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
5 changes: 4 additions & 1 deletion
5
modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/gradle.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
org.gradle.caching=true | ||
kotlin.code.style=official | ||
ktor_version=2.3.12 | ||
kotlin_version=2.0.20 | ||
logback_version=1.4.14 |
3 changes: 2 additions & 1 deletion
3
samples/server/petstore/kotlin-server-modelMutable/.openapi-generator/FILES
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
samples/server/petstore/kotlin-server-modelMutable/build.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
|
||
val kotlin_version: String by project | ||
val logback_version: String by project | ||
|
||
group = "org.openapitools" | ||
version = "1.0.0" | ||
|
||
plugins { | ||
kotlin("jvm") version "2.0.20" | ||
id("io.ktor.plugin") version "2.3.12" | ||
} | ||
|
||
application { | ||
mainClass.set("io.ktor.server.netty.EngineMain") | ||
|
||
val isDevelopment: Boolean = project.ext.has("development") | ||
applicationDefaultJvmArgs = listOf("-Dio.ktor.development=$isDevelopment") | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation("ch.qos.logback:logback-classic:$logback_version") | ||
implementation("com.typesafe:config:1.4.1") | ||
implementation("io.ktor:ktor-server-auth") | ||
implementation("io.ktor:ktor-client-apache") | ||
implementation("io.ktor:ktor-server-auto-head-response") | ||
implementation("io.ktor:ktor-server-default-headers") | ||
implementation("io.ktor:ktor-server-content-negotiation") | ||
implementation("io.ktor:ktor-serialization-gson") | ||
implementation("io.ktor:ktor-server-resources") | ||
implementation("io.ktor:ktor-server-hsts") | ||
implementation("io.ktor:ktor-server-compression") | ||
implementation("io.dropwizard.metrics:metrics-core:4.1.18") | ||
implementation("io.ktor:ktor-server-metrics") | ||
implementation("io.ktor:ktor-server-netty") | ||
|
||
testImplementation("org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version") | ||
} |
5 changes: 4 additions & 1 deletion
5
samples/server/petstore/kotlin-server-modelMutable/gradle.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
org.gradle.caching=true | ||
kotlin.code.style=official | ||
ktor_version=2.3.12 | ||
kotlin_version=2.0.20 | ||
logback_version=1.4.14 |
5 changes: 5 additions & 0 deletions
5
samples/server/petstore/kotlin-server-modelMutable/gradle/wrapper/gradle-wrapper.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
3 changes: 2 additions & 1 deletion
3
samples/server/petstore/kotlin-server/ktor/.openapi-generator/FILES
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.