forked from loafle/openapi-generator-original
[java][webclient/resttemplate] fix dependencies for gradle with jakarta (#14925)
This commit is contained in:
parent
3826d712ad
commit
85ff3de157
@ -34,6 +34,9 @@ jobs:
|
||||
path: |
|
||||
~/.m2
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
- name: Build
|
||||
- name: Build with Maven
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: mvn clean package
|
||||
- name: Build with Gradle
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: gradle clean build
|
||||
|
@ -32,8 +32,14 @@ if(hasProperty('target') && target == 'android') {
|
||||
targetSdkVersion 22
|
||||
}
|
||||
compileOptions {
|
||||
{{#useJakartaEe}}
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
{{/useJakartaEe}}
|
||||
{{^useJakartaEe}}
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
{{/useJakartaEe}}
|
||||
}
|
||||
|
||||
// Rename the aar correctly
|
||||
@ -66,7 +72,7 @@ if(hasProperty('target') && target == 'android') {
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
from android.sourceSets.main.java.srcDirs
|
||||
classifier = 'sources'
|
||||
archiveClassifier = 'sources'
|
||||
}
|
||||
|
||||
artifacts {
|
||||
@ -78,8 +84,14 @@ if(hasProperty('target') && target == 'android') {
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
{{#useJakartaEe}}
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
{{/useJakartaEe}}
|
||||
{{^useJakartaEe}}
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
{{/useJakartaEe}}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
@ -91,26 +103,36 @@ if(hasProperty('target') && target == 'android') {
|
||||
}
|
||||
|
||||
task execute(type:JavaExec) {
|
||||
main = System.getProperty('mainClass')
|
||||
mainClass = System.getProperty('mainClass')
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
}
|
||||
}
|
||||
|
||||
ext {
|
||||
{{#swagger1AnnotationLibrary}}
|
||||
swagger_annotations_version = "1.6.9"
|
||||
{{/swagger1AnnotationLibrary}}
|
||||
jackson_version = "2.14.1"
|
||||
jackson_databind_version = "2.14.1"
|
||||
{{#openApiNullable}}
|
||||
jackson_databind_nullable_version = "0.2.6"
|
||||
{{/openApiNullable}}
|
||||
jakarta_annotation_version = "1.3.5"
|
||||
{{#useJakartaEe}}
|
||||
spring_web_version = "6.0.3"
|
||||
jakarta_annotation_version = "2.1.1"
|
||||
{{/useJakartaEe}}
|
||||
{{^useJakartaEe}}
|
||||
spring_web_version = "5.3.24"
|
||||
jakarta_annotation_version = "1.3.5"
|
||||
{{/useJakartaEe}}
|
||||
jodatime_version = "2.9.9"
|
||||
junit_version = "4.13.2"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
{{#swagger1AnnotationLibrary}}
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
{{/swagger1AnnotationLibrary}}
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "org.springframework:spring-web:$spring_web_version"
|
||||
implementation "org.springframework:spring-context:$spring_web_version"
|
||||
|
@ -32,8 +32,14 @@ if(hasProperty('target') && target == 'android') {
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
{{#useJakartaEe}}
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
{{/useJakartaEe}}
|
||||
{{^useJakartaEe}}
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
{{/useJakartaEe}}
|
||||
}
|
||||
|
||||
// Rename the aar correctly
|
||||
@ -66,7 +72,7 @@ if(hasProperty('target') && target == 'android') {
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
from android.sourceSets.main.java.srcDirs
|
||||
classifier = 'sources'
|
||||
archiveClassifier = 'sources'
|
||||
}
|
||||
|
||||
artifacts {
|
||||
@ -78,8 +84,14 @@ if(hasProperty('target') && target == 'android') {
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
{{#useJakartaEe}}
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
{{/useJakartaEe}}
|
||||
{{^useJakartaEe}}
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
{{/useJakartaEe}}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
@ -91,17 +103,17 @@ if(hasProperty('target') && target == 'android') {
|
||||
}
|
||||
|
||||
task execute(type:JavaExec) {
|
||||
main = System.getProperty('mainClass')
|
||||
mainClass = System.getProperty('mainClass')
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
classifier = 'sources'
|
||||
archiveClassifier = 'sources'
|
||||
from sourceSets.main.allSource
|
||||
}
|
||||
|
||||
task javadocJar(type: Jar, dependsOn: javadoc) {
|
||||
classifier = 'javadoc'
|
||||
archiveClassifier = 'javadoc'
|
||||
from javadoc.destinationDir
|
||||
}
|
||||
|
||||
@ -112,22 +124,36 @@ if(hasProperty('target') && target == 'android') {
|
||||
}
|
||||
|
||||
ext {
|
||||
{{#swagger1AnnotationLibrary}}
|
||||
swagger_annotations_version = "1.6.3"
|
||||
{{/swagger1AnnotationLibrary}}
|
||||
{{#useJakartaEe}}
|
||||
spring_boot_version = "3.0.1"
|
||||
jakarta_annotation_version = "2.1.1"
|
||||
reactor_version = "3.5.1"
|
||||
reactor_netty_version = "1.1.1"
|
||||
{{/useJakartaEe}}
|
||||
{{^useJakartaEe}}
|
||||
spring_boot_version = "2.6.6"
|
||||
jakarta_annotation_version = "1.3.5"
|
||||
reactor_version = "3.4.3"
|
||||
reactor_netty_version = "1.0.4"
|
||||
{{/useJakartaEe}}
|
||||
jackson_version = "2.13.4"
|
||||
jackson_databind_version = "2.13.4.2"
|
||||
{{#openApiNullable}}
|
||||
jackson_databind_nullable_version = "0.2.6"
|
||||
{{/openApiNullable}}
|
||||
jakarta_annotation_version = "1.3.5"
|
||||
reactor_version = "3.4.3"
|
||||
reactor_netty_version = "1.0.4"
|
||||
{{#joda}}
|
||||
jodatime_version = "2.9.9"
|
||||
{{/joda}}
|
||||
junit_version = "4.13.2"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
{{#swagger1AnnotationLibrary}}
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
{{/swagger1AnnotationLibrary}}
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "io.projectreactor:reactor-core:$reactor_version"
|
||||
implementation "org.springframework.boot:spring-boot-starter-webflux:$spring_boot_version"
|
||||
|
@ -32,8 +32,8 @@ if(hasProperty('target') && target == 'android') {
|
||||
targetSdkVersion 22
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
// Rename the aar correctly
|
||||
@ -66,7 +66,7 @@ if(hasProperty('target') && target == 'android') {
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
from android.sourceSets.main.java.srcDirs
|
||||
classifier = 'sources'
|
||||
archiveClassifier = 'sources'
|
||||
}
|
||||
|
||||
artifacts {
|
||||
@ -78,8 +78,8 @@ if(hasProperty('target') && target == 'android') {
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
@ -91,24 +91,22 @@ if(hasProperty('target') && target == 'android') {
|
||||
}
|
||||
|
||||
task execute(type:JavaExec) {
|
||||
main = System.getProperty('mainClass')
|
||||
mainClass = System.getProperty('mainClass')
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
}
|
||||
}
|
||||
|
||||
ext {
|
||||
swagger_annotations_version = "1.6.9"
|
||||
jackson_version = "2.14.1"
|
||||
jackson_databind_version = "2.14.1"
|
||||
jackson_databind_nullable_version = "0.2.6"
|
||||
jakarta_annotation_version = "1.3.5"
|
||||
spring_web_version = "5.3.24"
|
||||
spring_web_version = "6.0.3"
|
||||
jakarta_annotation_version = "2.1.1"
|
||||
jodatime_version = "2.9.9"
|
||||
junit_version = "4.13.2"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "org.springframework:spring-web:$spring_web_version"
|
||||
implementation "org.springframework:spring-context:$spring_web_version"
|
||||
|
0
samples/client/petstore/java/resttemplate-jakarta/gradlew
vendored
Normal file → Executable file
0
samples/client/petstore/java/resttemplate-jakarta/gradlew
vendored
Normal file → Executable file
@ -66,7 +66,7 @@ if(hasProperty('target') && target == 'android') {
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
from android.sourceSets.main.java.srcDirs
|
||||
classifier = 'sources'
|
||||
archiveClassifier = 'sources'
|
||||
}
|
||||
|
||||
artifacts {
|
||||
@ -91,7 +91,7 @@ if(hasProperty('target') && target == 'android') {
|
||||
}
|
||||
|
||||
task execute(type:JavaExec) {
|
||||
main = System.getProperty('mainClass')
|
||||
mainClass = System.getProperty('mainClass')
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
}
|
||||
}
|
||||
@ -101,8 +101,8 @@ ext {
|
||||
jackson_version = "2.14.1"
|
||||
jackson_databind_version = "2.14.1"
|
||||
jackson_databind_nullable_version = "0.2.6"
|
||||
jakarta_annotation_version = "1.3.5"
|
||||
spring_web_version = "5.3.24"
|
||||
jakarta_annotation_version = "1.3.5"
|
||||
jodatime_version = "2.9.9"
|
||||
junit_version = "4.13.2"
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ if(hasProperty('target') && target == 'android') {
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
from android.sourceSets.main.java.srcDirs
|
||||
classifier = 'sources'
|
||||
archiveClassifier = 'sources'
|
||||
}
|
||||
|
||||
artifacts {
|
||||
@ -91,24 +91,22 @@ if(hasProperty('target') && target == 'android') {
|
||||
}
|
||||
|
||||
task execute(type:JavaExec) {
|
||||
main = System.getProperty('mainClass')
|
||||
mainClass = System.getProperty('mainClass')
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
}
|
||||
}
|
||||
|
||||
ext {
|
||||
swagger_annotations_version = "1.6.9"
|
||||
jackson_version = "2.14.1"
|
||||
jackson_databind_version = "2.14.1"
|
||||
jackson_databind_nullable_version = "0.2.6"
|
||||
jakarta_annotation_version = "1.3.5"
|
||||
spring_web_version = "5.3.24"
|
||||
jakarta_annotation_version = "1.3.5"
|
||||
jodatime_version = "2.9.9"
|
||||
junit_version = "4.13.2"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "org.springframework:spring-web:$spring_web_version"
|
||||
implementation "org.springframework:spring-context:$spring_web_version"
|
||||
|
@ -66,7 +66,7 @@ if(hasProperty('target') && target == 'android') {
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
from android.sourceSets.main.java.srcDirs
|
||||
classifier = 'sources'
|
||||
archiveClassifier = 'sources'
|
||||
}
|
||||
|
||||
artifacts {
|
||||
@ -91,24 +91,22 @@ if(hasProperty('target') && target == 'android') {
|
||||
}
|
||||
|
||||
task execute(type:JavaExec) {
|
||||
main = System.getProperty('mainClass')
|
||||
mainClass = System.getProperty('mainClass')
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
}
|
||||
}
|
||||
|
||||
ext {
|
||||
swagger_annotations_version = "1.6.9"
|
||||
jackson_version = "2.14.1"
|
||||
jackson_databind_version = "2.14.1"
|
||||
jackson_databind_nullable_version = "0.2.6"
|
||||
jakarta_annotation_version = "1.3.5"
|
||||
spring_web_version = "5.3.24"
|
||||
jakarta_annotation_version = "1.3.5"
|
||||
jodatime_version = "2.9.9"
|
||||
junit_version = "4.13.2"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "org.springframework:spring-web:$spring_web_version"
|
||||
implementation "org.springframework:spring-context:$spring_web_version"
|
||||
|
@ -32,8 +32,8 @@ if(hasProperty('target') && target == 'android') {
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
// Rename the aar correctly
|
||||
@ -66,7 +66,7 @@ if(hasProperty('target') && target == 'android') {
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
from android.sourceSets.main.java.srcDirs
|
||||
classifier = 'sources'
|
||||
archiveClassifier = 'sources'
|
||||
}
|
||||
|
||||
artifacts {
|
||||
@ -78,8 +78,8 @@ if(hasProperty('target') && target == 'android') {
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
@ -91,17 +91,17 @@ if(hasProperty('target') && target == 'android') {
|
||||
}
|
||||
|
||||
task execute(type:JavaExec) {
|
||||
main = System.getProperty('mainClass')
|
||||
mainClass = System.getProperty('mainClass')
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
classifier = 'sources'
|
||||
archiveClassifier = 'sources'
|
||||
from sourceSets.main.allSource
|
||||
}
|
||||
|
||||
task javadocJar(type: Jar, dependsOn: javadoc) {
|
||||
classifier = 'javadoc'
|
||||
archiveClassifier = 'javadoc'
|
||||
from javadoc.destinationDir
|
||||
}
|
||||
|
||||
@ -112,20 +112,17 @@ if(hasProperty('target') && target == 'android') {
|
||||
}
|
||||
|
||||
ext {
|
||||
swagger_annotations_version = "1.6.3"
|
||||
spring_boot_version = "2.6.6"
|
||||
spring_boot_version = "3.0.1"
|
||||
jakarta_annotation_version = "2.1.1"
|
||||
reactor_version = "3.5.1"
|
||||
reactor_netty_version = "1.1.1"
|
||||
jackson_version = "2.13.4"
|
||||
jackson_databind_version = "2.13.4.2"
|
||||
jackson_databind_nullable_version = "0.2.6"
|
||||
jakarta_annotation_version = "1.3.5"
|
||||
reactor_version = "3.4.3"
|
||||
reactor_netty_version = "1.0.4"
|
||||
jodatime_version = "2.9.9"
|
||||
junit_version = "4.13.2"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "io.projectreactor:reactor-core:$reactor_version"
|
||||
implementation "org.springframework.boot:spring-boot-starter-webflux:$spring_boot_version"
|
||||
|
0
samples/client/petstore/java/webclient-jakarta/gradlew
vendored
Normal file → Executable file
0
samples/client/petstore/java/webclient-jakarta/gradlew
vendored
Normal file → Executable file
@ -66,7 +66,7 @@ if(hasProperty('target') && target == 'android') {
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
from android.sourceSets.main.java.srcDirs
|
||||
classifier = 'sources'
|
||||
archiveClassifier = 'sources'
|
||||
}
|
||||
|
||||
artifacts {
|
||||
@ -91,17 +91,17 @@ if(hasProperty('target') && target == 'android') {
|
||||
}
|
||||
|
||||
task execute(type:JavaExec) {
|
||||
main = System.getProperty('mainClass')
|
||||
mainClass = System.getProperty('mainClass')
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
classifier = 'sources'
|
||||
archiveClassifier = 'sources'
|
||||
from sourceSets.main.allSource
|
||||
}
|
||||
|
||||
task javadocJar(type: Jar, dependsOn: javadoc) {
|
||||
classifier = 'javadoc'
|
||||
archiveClassifier = 'javadoc'
|
||||
from javadoc.destinationDir
|
||||
}
|
||||
|
||||
@ -112,20 +112,17 @@ if(hasProperty('target') && target == 'android') {
|
||||
}
|
||||
|
||||
ext {
|
||||
swagger_annotations_version = "1.6.3"
|
||||
spring_boot_version = "2.6.6"
|
||||
jackson_version = "2.13.4"
|
||||
jackson_databind_version = "2.13.4.2"
|
||||
jackson_databind_nullable_version = "0.2.6"
|
||||
jakarta_annotation_version = "1.3.5"
|
||||
reactor_version = "3.4.3"
|
||||
reactor_netty_version = "1.0.4"
|
||||
jodatime_version = "2.9.9"
|
||||
jackson_version = "2.13.4"
|
||||
jackson_databind_version = "2.13.4.2"
|
||||
jackson_databind_nullable_version = "0.2.6"
|
||||
junit_version = "4.13.2"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "io.projectreactor:reactor-core:$reactor_version"
|
||||
implementation "org.springframework.boot:spring-boot-starter-webflux:$spring_boot_version"
|
||||
|
@ -66,7 +66,7 @@ if(hasProperty('target') && target == 'android') {
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
from android.sourceSets.main.java.srcDirs
|
||||
classifier = 'sources'
|
||||
archiveClassifier = 'sources'
|
||||
}
|
||||
|
||||
artifacts {
|
||||
@ -91,17 +91,17 @@ if(hasProperty('target') && target == 'android') {
|
||||
}
|
||||
|
||||
task execute(type:JavaExec) {
|
||||
main = System.getProperty('mainClass')
|
||||
mainClass = System.getProperty('mainClass')
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
classifier = 'sources'
|
||||
archiveClassifier = 'sources'
|
||||
from sourceSets.main.allSource
|
||||
}
|
||||
|
||||
task javadocJar(type: Jar, dependsOn: javadoc) {
|
||||
classifier = 'javadoc'
|
||||
archiveClassifier = 'javadoc'
|
||||
from javadoc.destinationDir
|
||||
}
|
||||
|
||||
@ -112,20 +112,17 @@ if(hasProperty('target') && target == 'android') {
|
||||
}
|
||||
|
||||
ext {
|
||||
swagger_annotations_version = "1.6.3"
|
||||
spring_boot_version = "2.6.6"
|
||||
jackson_version = "2.13.4"
|
||||
jackson_databind_version = "2.13.4.2"
|
||||
jackson_databind_nullable_version = "0.2.6"
|
||||
jakarta_annotation_version = "1.3.5"
|
||||
reactor_version = "3.4.3"
|
||||
reactor_netty_version = "1.0.4"
|
||||
jodatime_version = "2.9.9"
|
||||
jackson_version = "2.13.4"
|
||||
jackson_databind_version = "2.13.4.2"
|
||||
jackson_databind_nullable_version = "0.2.6"
|
||||
junit_version = "4.13.2"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "io.projectreactor:reactor-core:$reactor_version"
|
||||
implementation "org.springframework.boot:spring-boot-starter-webflux:$spring_boot_version"
|
||||
|
Loading…
x
Reference in New Issue
Block a user