Upgrade the build to Java 25
See gh-35531 Closes gh-35530
This commit is contained in:
parent
aa272b4cd9
commit
7edb0b3397
|
@ -19,7 +19,7 @@ inputs:
|
||||||
java-version:
|
java-version:
|
||||||
description: 'Java version to compile and test with'
|
description: 'Java version to compile and test with'
|
||||||
required: false
|
required: false
|
||||||
default: '24'
|
default: '25'
|
||||||
publish:
|
publish:
|
||||||
description: 'Whether to publish artifacts ready for deployment to Artifactory'
|
description: 'Whether to publish artifacts ready for deployment to Artifactory'
|
||||||
required: false
|
required: false
|
||||||
|
|
|
@ -19,7 +19,7 @@ inputs:
|
||||||
java-version:
|
java-version:
|
||||||
description: 'Java version to use for the build'
|
description: 'Java version to use for the build'
|
||||||
required: false
|
required: false
|
||||||
default: '24'
|
default: '25'
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
|
@ -30,7 +30,7 @@ runs:
|
||||||
java-version: |
|
java-version: |
|
||||||
${{ inputs.java-early-access == 'true' && format('{0}-ea', inputs.java-version) || inputs.java-version }}
|
${{ inputs.java-early-access == 'true' && format('{0}-ea', inputs.java-version) || inputs.java-version }}
|
||||||
${{ inputs.java-toolchain == 'true' && '17' || '' }}
|
${{ inputs.java-toolchain == 'true' && '17' || '' }}
|
||||||
24
|
25
|
||||||
- name: Set Up Gradle
|
- name: Set Up Gradle
|
||||||
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
|
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -20,7 +20,7 @@ jobs:
|
||||||
toolchain: false
|
toolchain: false
|
||||||
- version: 21
|
- version: 21
|
||||||
toolchain: true
|
toolchain: true
|
||||||
- version: 24
|
- version: 25
|
||||||
toolchain: true
|
toolchain: true
|
||||||
exclude:
|
exclude:
|
||||||
- os:
|
- os:
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
# Enable auto-env through the sdkman_auto_env config
|
# Enable auto-env through the sdkman_auto_env config
|
||||||
# Add key=value pairs of SDKs to use below
|
# Add key=value pairs of SDKs to use below
|
||||||
java=24.0.2-librca
|
java=25-librca
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class JavaConventions {
|
||||||
* <p>NOTE: If you update this value, you should also update the value used in
|
* <p>NOTE: If you update this value, you should also update the value used in
|
||||||
* the {@code javadoc} task in {@code framework-api.gradle}.
|
* the {@code javadoc} task in {@code framework-api.gradle}.
|
||||||
*/
|
*/
|
||||||
private static final JavaLanguageVersion DEFAULT_LANGUAGE_VERSION = JavaLanguageVersion.of(24);
|
private static final JavaLanguageVersion DEFAULT_LANGUAGE_VERSION = JavaLanguageVersion.of(25);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Java version we should use as the baseline for the compiled bytecode
|
* The Java version we should use as the baseline for the compiled bytecode
|
||||||
|
|
|
@ -22,7 +22,7 @@ dependencies {
|
||||||
|
|
||||||
javadoc {
|
javadoc {
|
||||||
javadocTool.set(javaToolchains.javadocToolFor({
|
javadocTool.set(javaToolchains.javadocToolFor({
|
||||||
languageVersion = JavaLanguageVersion.of(24)
|
languageVersion = JavaLanguageVersion.of(25)
|
||||||
}))
|
}))
|
||||||
|
|
||||||
title = "${rootProject.description} ${version} API"
|
title = "${rootProject.description} ${version} API"
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
|
@ -43,10 +44,14 @@ repositories {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// To avoid a redeclaration error with Kotlin compiler
|
// To avoid a redeclaration error with Kotlin compiler and set the JVM target
|
||||||
tasks.named('compileKotlin', KotlinCompilationTask.class) {
|
tasks.withType(KotlinCompilationTask.class).configureEach {
|
||||||
javaSources.from = []
|
javaSources.from = []
|
||||||
compilerOptions.freeCompilerArgs = [ "-Xannotation-default-target=param-property" ] // Upcoming default, see https://youtrack.jetbrains.com/issue/KT-73255
|
compilerOptions.jvmTarget = JvmTarget.JVM_17
|
||||||
|
compilerOptions.freeCompilerArgs.addAll(
|
||||||
|
"-Xjdk-release=17", // Needed due to https://youtrack.jetbrains.com/issue/KT-49746
|
||||||
|
"-Xannotation-default-target=param-property" // Upcoming default, see https://youtrack.jetbrains.com/issue/KT-73255
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
|
@ -78,7 +78,7 @@ javadoc {
|
||||||
// Change modularity mismatch from warn to info.
|
// Change modularity mismatch from warn to info.
|
||||||
// See https://github.com/spring-projects/spring-framework/issues/27497
|
// See https://github.com/spring-projects/spring-framework/issues/27497
|
||||||
addStringOption("-link-modularity-mismatch", "info")
|
addStringOption("-link-modularity-mismatch", "info")
|
||||||
// With the javadoc tool on Java 24, it appears that the 'reference'
|
// With the javadoc tool on Java 25, it appears that the 'reference'
|
||||||
// group is always active and the '-reference' flag is not honored.
|
// group is always active and the '-reference' flag is not honored.
|
||||||
// Thus, we do NOT fail the build on Javadoc warnings due to
|
// Thus, we do NOT fail the build on Javadoc warnings due to
|
||||||
// cross-module @see and @link references which are only reachable
|
// cross-module @see and @link references which are only reachable
|
||||||
|
|
|
@ -25,6 +25,7 @@ import java.util.stream.Collectors;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import org.junit.jupiter.api.condition.JRE;
|
||||||
import reactor.core.publisher.Flux;
|
import reactor.core.publisher.Flux;
|
||||||
import reactor.core.publisher.Mono;
|
import reactor.core.publisher.Mono;
|
||||||
import reactor.core.scheduler.Schedulers;
|
import reactor.core.scheduler.Schedulers;
|
||||||
|
@ -60,8 +61,10 @@ import org.springframework.web.reactive.function.client.WebClient;
|
||||||
import org.springframework.web.server.adapter.WebHttpHandlerBuilder;
|
import org.springframework.web.server.adapter.WebHttpHandlerBuilder;
|
||||||
import org.springframework.web.testfixture.http.server.reactive.bootstrap.AbstractHttpHandlerIntegrationTests;
|
import org.springframework.web.testfixture.http.server.reactive.bootstrap.AbstractHttpHandlerIntegrationTests;
|
||||||
import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer;
|
import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer;
|
||||||
|
import org.springframework.web.testfixture.http.server.reactive.bootstrap.JettyHttpServer;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
import static org.assertj.core.api.Assumptions.assumeThat;
|
||||||
|
|
||||||
class MultipartWebClientIntegrationTests extends AbstractHttpHandlerIntegrationTests {
|
class MultipartWebClientIntegrationTests extends AbstractHttpHandlerIntegrationTests {
|
||||||
|
|
||||||
|
@ -166,6 +169,11 @@ class MultipartWebClientIntegrationTests extends AbstractHttpHandlerIntegrationT
|
||||||
|
|
||||||
@ParameterizedHttpServerTest
|
@ParameterizedHttpServerTest
|
||||||
void transferTo(HttpServer httpServer) throws Exception {
|
void transferTo(HttpServer httpServer) throws Exception {
|
||||||
|
// TODO https://github.com/spring-projects/spring-framework/issues/35531
|
||||||
|
if (JRE.JAVA_25.isCurrentVersion()) {
|
||||||
|
assumeThat(httpServer).isNotInstanceOf(JettyHttpServer.class);
|
||||||
|
}
|
||||||
|
|
||||||
startServer(httpServer);
|
startServer(httpServer);
|
||||||
|
|
||||||
Flux<String> result = webClient
|
Flux<String> result = webClient
|
||||||
|
|
Loading…
Reference in New Issue