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:
|
||||
description: 'Java version to compile and test with'
|
||||
required: false
|
||||
default: '24'
|
||||
default: '25'
|
||||
publish:
|
||||
description: 'Whether to publish artifacts ready for deployment to Artifactory'
|
||||
required: false
|
||||
|
|
|
@ -19,7 +19,7 @@ inputs:
|
|||
java-version:
|
||||
description: 'Java version to use for the build'
|
||||
required: false
|
||||
default: '24'
|
||||
default: '25'
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
|
@ -30,7 +30,7 @@ runs:
|
|||
java-version: |
|
||||
${{ inputs.java-early-access == 'true' && format('{0}-ea', inputs.java-version) || inputs.java-version }}
|
||||
${{ inputs.java-toolchain == 'true' && '17' || '' }}
|
||||
24
|
||||
25
|
||||
- name: Set Up Gradle
|
||||
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
|
||||
with:
|
||||
|
|
|
@ -20,7 +20,7 @@ jobs:
|
|||
toolchain: false
|
||||
- version: 21
|
||||
toolchain: true
|
||||
- version: 24
|
||||
- version: 25
|
||||
toolchain: true
|
||||
exclude:
|
||||
- os:
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# Enable auto-env through the sdkman_auto_env config
|
||||
# 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
|
||||
* 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
|
||||
|
|
|
@ -22,7 +22,7 @@ dependencies {
|
|||
|
||||
javadoc {
|
||||
javadocTool.set(javaToolchains.javadocToolFor({
|
||||
languageVersion = JavaLanguageVersion.of(24)
|
||||
languageVersion = JavaLanguageVersion.of(25)
|
||||
}))
|
||||
|
||||
title = "${rootProject.description} ${version} API"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
|
||||
|
||||
plugins {
|
||||
|
@ -43,10 +44,14 @@ repositories {
|
|||
}
|
||||
}
|
||||
|
||||
// To avoid a redeclaration error with Kotlin compiler
|
||||
tasks.named('compileKotlin', KotlinCompilationTask.class) {
|
||||
// To avoid a redeclaration error with Kotlin compiler and set the JVM target
|
||||
tasks.withType(KotlinCompilationTask.class).configureEach {
|
||||
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 {
|
||||
|
|
|
@ -78,7 +78,7 @@ javadoc {
|
|||
// Change modularity mismatch from warn to info.
|
||||
// See https://github.com/spring-projects/spring-framework/issues/27497
|
||||
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.
|
||||
// Thus, we do NOT fail the build on Javadoc warnings due to
|
||||
// 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.JsonProperty;
|
||||
import org.junit.jupiter.api.condition.JRE;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
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.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.JettyHttpServer;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assumptions.assumeThat;
|
||||
|
||||
class MultipartWebClientIntegrationTests extends AbstractHttpHandlerIntegrationTests {
|
||||
|
||||
|
@ -166,6 +169,11 @@ class MultipartWebClientIntegrationTests extends AbstractHttpHandlerIntegrationT
|
|||
|
||||
@ParameterizedHttpServerTest
|
||||
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);
|
||||
|
||||
Flux<String> result = webClient
|
||||
|
|
Loading…
Reference in New Issue