Skip to content

Commit f145b89

Browse files
[kotlin-client] Update Gradle and dependencies (#18571)
* [kotlin] Target correct library in jvm-spring-webclient sample * [kotlin] Fixed warning in jvm-spring-restclient * [kotlin-client] Bump Gradle version * [kotlin-client] enableFeaturePreview no longer needed as it's enabled by default * [kotlin-client] Bump kotlin, spotless, and reactor versions * [kotlin-client] Generated code * [kotlin-client] Missed a generated sample * [kotlin-client] Bumped gradle and java version in kotlin-client workflows * [kotlin-client] First attempt to fix jvm-volley * [kotlin-client] Use standard gradle action instead of custom one * [kotlin-client] Use original gradlew action but without specific version * [kotlin-client] Moved sample kotlin-spring-cloud to servers instead of clients * [kotlin-client] Added previously missing generated file * [kotlin-client] Corrected sample path
1 parent 296a6ac commit f145b89

File tree

306 files changed

+16517
-8833
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

306 files changed

+16517
-8833
lines changed

.github/workflows/samples-kotlin-client.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ on:
1010
- 'samples/client/petstore/kotlin*/**'
1111
- 'samples/client/others/kotlin-jvm-okhttp-parameter-tests/**'
1212

13-
env:
14-
GRADLE_VERSION: 6.9
15-
1613
jobs:
1714
build:
1815
name: Build Kotlin client
@@ -65,15 +62,14 @@ jobs:
6562
- samples/client/echo_api/kotlin-jvm-spring-3-webclient
6663
- samples/client/petstore/kotlin-jvm-spring-3-restclient
6764
- samples/client/echo_api/kotlin-jvm-spring-3-restclient
68-
- samples/client/petstore/kotlin-spring-cloud
6965
- samples/client/petstore/kotlin-name-parameter-mappings
7066
- samples/client/others/kotlin-jvm-okhttp-parameter-tests
7167
steps:
7268
- uses: actions/checkout@v4
7369
- uses: actions/setup-java@v4
7470
with:
7571
distribution: 'temurin'
76-
java-version: 8
72+
java-version: 11
7773
- name: Cache maven dependencies
7874
uses: actions/cache@v4
7975
env:
@@ -85,7 +81,6 @@ jobs:
8581
- name: Install Gradle wrapper
8682
uses: eskatos/gradle-command-action@v3
8783
with:
88-
gradle-version: ${{ env.GRADLE_VERSION }}
8984
build-root-directory: ${{ matrix.sample }}
9085
arguments: wrapper
9186
- name: Build

.github/workflows/samples-kotlin-echo-api.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ on:
77
pull_request:
88
paths:
99
- samples/client/echo_api/kotlin**
10-
env:
11-
GRADLE_VERSION: 7.4
10+
1211
jobs:
1312
build:
1413
name: Build Kotlin Client JDK17
@@ -37,7 +36,6 @@ jobs:
3736
- name: Install Gradle wrapper
3837
uses: eskatos/gradle-command-action@v3
3938
with:
40-
gradle-version: ${{ env.GRADLE_VERSION }}
4139
build-root-directory: ${{ matrix.sample }}
4240
arguments: wrapper
4341
- name: Setup node.js

.github/workflows/samples-kotlin-server.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343
- samples/server/petstore/kotlin-server/javalin
4444
- samples/server/others/kotlin-server/jaxrs-spec
4545
- samples/server/others/kotlin-server/jaxrs-spec-array-response
46+
- samples/server/petstore/kotlin-spring-cloud
4647
# comment out due to gradle build failure
4748
#- samples/server/petstore/kotlin-spring-default
4849
# no build.gradle file

bin/configs/kotlin-spring-cloud.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
generatorName: kotlin-spring
2-
outputDir: samples/client/petstore/kotlin-spring-cloud
2+
outputDir: samples/server/petstore/kotlin-spring-cloud
33
library: spring-cloud
44
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
55
templateDir: modules/openapi-generator/src/main/resources/kotlin-spring

modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ version '{{artifactVersion}}'
33
{{^omitGradleWrapper}}
44

55
wrapper {
6-
gradleVersion = '7.5'
6+
gradleVersion = '8.7'
77
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
88
}
99
{{/omitGradleWrapper}}
1010

1111
buildscript {
12-
ext.kotlin_version = '1.8.10'
12+
ext.kotlin_version = '1.9.23'
1313
{{#jvm-ktor}}
1414
ext.ktor_version = '2.3.9'
1515
{{/jvm-ktor}}
@@ -24,17 +24,13 @@ buildscript {
2424
{{/jvm-vertx}}
2525
{{#jvm-spring}}
2626
{{#useSpringBoot3}}
27-
ext.spring_boot_version = "3.2.4"
27+
ext.spring_boot_version = "3.2.5"
2828
{{/useSpringBoot3}}
2929
{{^useSpringBoot3}}
3030
ext.spring_boot_version = "2.7.18"
3131
{{/useSpringBoot3}}
32-
{{#jvm-spring-webclient}}
33-
ext.reactor_version = "3.6.4"
34-
{{/jvm-spring-webclient}}
3532
{{/jvm-spring}}
36-
// 6.13.0 is the latest stable release that supports JDK8
37-
ext.spotless_version = "6.13.0"
33+
ext.spotless_version = "6.25.0"
3834

3935
repositories {
4036
maven { url "https://repo1.maven.org/maven2" }
@@ -167,7 +163,7 @@ dependencies {
167163
{{/jvm-okhttp4}}
168164
{{#jvm-spring-webclient}}
169165
implementation "org.springframework.boot:spring-boot-starter-webflux:$spring_boot_version"
170-
implementation "io.projectreactor:reactor-core:$reactor_version"
166+
implementation "io.projectreactor:reactor-core:3.6.5"
171167
{{/jvm-spring-webclient}}
172168
{{#jvm-spring-restclient}}
173169
implementation "org.springframework.boot:spring-boot-starter-web:$spring_boot_version"
Binary file not shown.
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-all.zip
3+
{{#jvm-volley}}
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-all.zip
5+
{{/jvm-volley}}
6+
{{^jvm-volley}}
7+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
8+
{{/jvm-volley}}
49
networkTimeout=10000
10+
validateDistributionUrl=true
511
zipStoreBase=GRADLE_USER_HOME
612
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)