Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: spring-projects/spring-framework
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v7.0.0-M5
Choose a base ref
...
head repository: spring-projects/spring-framework
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on May 16, 2025

  1. Copy the full SHA
    d0bf8fa View commit details
  2. Stop declaring parameters as final in JdbcTemplate

    The affected parameters are "effectively final" and are therefore no
    longer required to be declared as "final" on modern JDKs.
    sbrannen committed May 16, 2025
    Copy the full SHA
    f4f0e52 View commit details

Commits on May 19, 2025

  1. Refactoring in ApiVersionInserter

    Refine naming of static factory methods, and update them to be
    shortcuts for instance creation.
    
    See gh-34919
    rstoyanchev committed May 19, 2025
    Copy the full SHA
    5b19f62 View commit details
  2. Copy the full SHA
    a024e59 View commit details
  3. Copy the full SHA
    3095219 View commit details
  4. Copy the full SHA
    094e653 View commit details
  5. Copy the full SHA
    fdab8fa View commit details
  6. Merge branch '6.2.x'

    bclozel committed May 19, 2025
    Copy the full SHA
    81ea754 View commit details
  7. Add support for callable references to BeanRegistrarDsl

    BeanDefinitionDsl is allowing to create a bean from a callable
    reference with its parameters autowired by type,
    BeanRegistrarDsl should allow that too. For example:
    
    class SampleBeanRegistrar : BeanRegistrarDsl({
        registerBean<MyRepository>()
        registerBean(::myRouter)
    })
    
    fun myRouter(myRepository: MyRepository) = router {
        ...
    }
    
    Closes gh-34922
    sdeleuze committed May 19, 2025
    Copy the full SHA
    aa9ab8e View commit details
  8. Copy the full SHA
    e02e67b View commit details
  9. Use Content-Type charset in JAXB message converters

    Prior to this commit, the JAXB message converters would only rely on the
    encoding declaration inside the XML document for reading the document.
    This would then use the default UTF-8 encoding, even if the HTTP message
    has the `"application/xml;charset=iso-8859-1"` Content-Type.
    
    This commit ensures that both `Jaxb2CollectionHttpMessageConverter` and
    `Jaxb2RootElementHttpMessageConverter` use the encoding declared in the
    HTTP Content-Type, if present.
    
    Fixes gh-34745
    bclozel committed May 19, 2025
    Copy the full SHA
    2af0323 View commit details
  10. Merge branch '6.2.x'

    bclozel committed May 19, 2025
    Copy the full SHA
    1ea8a91 View commit details
  11. Copy the full SHA
    2e086bd View commit details

Commits on May 21, 2025

  1. Polishing

    sbrannen committed May 21, 2025
    Copy the full SHA
    362fe12 View commit details
  2. Remove obsolete TODO

    sbrannen committed May 21, 2025
    Copy the full SHA
    98cef50 View commit details
  3. Support registration of non-public BeanDefinitionReader via @⁠ImportR…

    …esource
    
    Prior to this commit, a BeanDefinitionReader registered via
    @⁠ImportResource was required to be public and have a public
    constructor that accepts a single BeanDefinitionRegistry. However, the
    public visibility requirements are not necessary, and the requirements
    for the constructor's formal parameter list is not documented.
    
    To address those issues, this commit removes the public visibility
    restrictions and documents that a BeanDefinitionReader registered via
    @⁠ImportResource must declare a constructor that accepts a single
    BeanDefinitionRegistry.
    
    In addition, this commit includes the cause of the instantiation
    failure in case the registered BeanDefinitionReader cannot be
    instantiated.
    
    Closes gh-34928
    sbrannen committed May 21, 2025
    Copy the full SHA
    d890a38 View commit details
  4. Merge branch '6.2.x'

    sbrannen committed May 21, 2025
    Copy the full SHA
    88ce11a View commit details
  5. Declare @⁠Contract for quote() & getFilename() in StringUtils

    This commit declares nullability @⁠Contract annotations for quote() and
    getFilename() in StringUtils.
    
    Closes gh-34896
    
    
    Signed-off-by: Stéphane Nicoll <stephane.nicoll@broadcom.com>
    snicoll authored May 21, 2025
    Copy the full SHA
    9d3779d View commit details
  6. Upgrade to Jetty 12.1.0.beta0

    Closes gh-34930
    bclozel committed May 21, 2025
    Copy the full SHA
    612dc57 View commit details

Commits on May 22, 2025

  1. Copy the full SHA
    efea289 View commit details
  2. Copy the full SHA
    db5809f View commit details
  3. Merge branch '6.2.x'

    sbrannen committed May 22, 2025
    Copy the full SHA
    e5a3c43 View commit details
  4. Copy the full SHA
    e4b4512 View commit details
  5. Merge branch '6.2.x'

    sbrannen committed May 22, 2025
    Copy the full SHA
    6653cd8 View commit details

Commits on May 23, 2025

  1. Upgrade to Gradle 8.14.1

    Closes gh-34937
    sbrannen committed May 23, 2025
    Copy the full SHA
    274b97c View commit details
  2. Merge branch '6.2.x'

    sbrannen committed May 23, 2025
    Copy the full SHA
    3be3e4d View commit details

Commits on May 26, 2025

  1. Copy the full SHA
    66f8eb0 View commit details
  2. Merge branch '6.2.x'

    sdeleuze committed May 26, 2025
    Copy the full SHA
    2da1f80 View commit details
  3. Fix the build with Java 24

    sdeleuze committed May 26, 2025
    Copy the full SHA
    a8ac541 View commit details
  4. Copy the full SHA
    eed0a3f View commit details
  5. Copy the full SHA
    13be54a View commit details
  6. Upgrade to Jackson 3.0.0-rc5

    Closes gh-34945
    sdeleuze committed May 26, 2025
    Copy the full SHA
    eb65df0 View commit details
  7. Upgrade to Kotlin 2.2.0-RC

    Closes gh-34946
    sdeleuze committed May 26, 2025
    Copy the full SHA
    3049e6d View commit details
  8. Copy the full SHA
    6a6abac View commit details
  9. Support Object property values in MockEnvironment

    The setProperty() and withProperty() methods in MockEnvironment were
    originally introduced with (String, String) signatures; however, they
    should have always had (String, Object) signatures in order to comply
    with the MockPropertySource and PropertySource APIs.
    
    To address that, this commit introduces variants of these methods that
    accept Object values for properties.
    
    Closes gh-34947
    sbrannen committed May 26, 2025
    Copy the full SHA
    d0efc22 View commit details
  10. Support only Object property values in MockEnvironment test fixture

    The setProperty() and withProperty() methods in MockEnvironment were
    originally introduced with (String, String) signatures; however, they
    should have always had (String, Object) signatures in order to comply
    with the MockPropertySource and PropertySource APIs.
    
    To address that, this commit changes the signatures of these methods so
    that they only accept Object values for properties.
    
    NOTE: this commit only affects the internal MockEnvironment used as a
    test fixture. This commit does not affect the official, public
    MockEnvironment implementation in spring-test.
    
    See gh-34947
    See gh-34948
    sbrannen committed May 26, 2025
    Copy the full SHA
    d782647 View commit details
  11. Merge branch '6.2.x'

    sbrannen committed May 26, 2025
    Copy the full SHA
    6f6e0d4 View commit details
  12. Remove [set|with]Property(String, String) variants from MockEnvironment

    Since setProperty(String, Object) and withProperty(String, Object)
    methods were introduced in MockEnvironment in 6.2.8, this commit removes
    the obsolete variants with (String, String) signatures.
    
    See gh-34947
    Closes gh-34948
    sbrannen committed May 26, 2025
    Copy the full SHA
    62f1814 View commit details
  13. Test conversion support in PropertySourcesPlaceholderConfigurer

    This commit introduces a @⁠Disabled "regression test" which demonstrates
    that PropertySourcesPlaceholderConfigurer uses the ConversionService
    from the Environment.
    
    See gh-34936
    sbrannen committed May 26, 2025
    Copy the full SHA
    53844b0 View commit details
  14. Merge branch '6.2.x'

    sbrannen committed May 26, 2025
    Copy the full SHA
    5d166f4 View commit details

Commits on May 27, 2025

  1. Copy the full SHA
    59299b9 View commit details
  2. Copy the full SHA
    15d1455 View commit details
  3. Copy the full SHA
    d9e261a View commit details
  4. Merge branch '6.2.x'

    jhoeller committed May 27, 2025
    Copy the full SHA
    cdfe089 View commit details
  5. Enforce consistent null check on injection points for pre-existing si…

    …ngleton beans
    
    Includes consistent JSpecify nullness check on fields as optional injection points
    
    Closes gh-34952
    See gh-34261
    jhoeller committed May 27, 2025
    Copy the full SHA
    b5d153f View commit details
  6. Use ConversionService from Environment in PropertySourcesPlaceholderC…

    …onfigurer
    
    This commit fixes a regression in PropertySourcesPlaceholderConfigurer
    that was introduced in Spring Framework 6.2.7.
    
    Specifically, this commit reinstates automatic String-conversion of
    values from PropertySources in the Environment using the
    ConversionService configured in the Environment.
    
    See gh-34861
    Closes gh-34936
    sbrannen committed May 27, 2025
    Copy the full SHA
    90be94a View commit details
  7. Merge branch '6.2.x'

    sbrannen committed May 27, 2025
    Copy the full SHA
    e03117c View commit details
  8. Copy the full SHA
    472c401 View commit details
  9. Merge branch '6.2.x'

    sbrannen committed May 27, 2025
    Copy the full SHA
    eb59d91 View commit details
  10. Copy the full SHA
    106e5c7 View commit details
Showing 9,197 changed files with 42,649 additions and 21,905 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .github/actions/build/action.yml
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ inputs:
java-version:
description: 'Java version to compile and test with'
required: false
default: '17'
default: '24'
publish:
description: 'Whether to publish artifacts ready for deployment to Artifactory'
required: false
5 changes: 3 additions & 2 deletions .github/actions/prepare-gradle-build/action.yml
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ inputs:
java-version:
description: 'Java version to use for the build'
required: false
default: '17'
default: '24'
runs:
using: composite
steps:
@@ -30,8 +30,9 @@ runs:
java-version: |
${{ inputs.java-early-access == 'true' && format('{0}-ea', inputs.java-version) || inputs.java-version }}
${{ inputs.java-toolchain == 'true' && '17' || '' }}
24
- name: Set Up Gradle
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4.2.2
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
with:
cache-read-only: false
develocity-access-key: ${{ inputs.develocity-access-key }}
27 changes: 9 additions & 18 deletions .github/actions/sync-to-maven-central/action.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
name: Sync to Maven Central
description: 'Syncs a release to Maven Central and waits for it to be available for use'
inputs:
jfrog-cli-config-token:
description: 'Config token for the JFrog CLI'
required: true
ossrh-s01-staging-profile:
description: 'Staging profile to use when syncing to Central'
central-token-password:
description: 'Password for authentication with central.sonatype.com'
required: true
ossrh-s01-token-password:
description: 'Password for authentication with s01.oss.sonatype.org'
central-token-username:
description: 'Username for authentication with central.sonatype.com'
required: true
ossrh-s01-token-username:
description: 'Username for authentication with s01.oss.sonatype.org'
jfrog-cli-config-token:
description: 'Config token for the JFrog CLI'
required: true
spring-framework-version:
description: 'Version of Spring Framework that is being synced to Central'
@@ -27,16 +24,10 @@ runs:
shell: bash
run: jf rt download --spec ${{ format('{0}/artifacts.spec', github.action_path) }} --spec-vars 'buildName=${{ format('spring-framework-{0}', inputs.spring-framework-version) }};buildNumber=${{ github.run_number }}'
- name: Sync
uses: spring-io/nexus-sync-action@42477a2230a2f694f9eaa4643fa9e76b99b7ab84 # v0.0.1
uses: spring-io/central-publish-action@0cdd90d12e6876341e82860d951e1bcddc1e51b6 # v0.2.0
with:
close: true
create: true
generate-checksums: true
password: ${{ inputs.ossrh-s01-token-password }}
release: true
staging-profile-name: ${{ inputs.ossrh-s01-staging-profile }}
upload: true
username: ${{ inputs.ossrh-s01-token-username }}
token: ${{ inputs.central-token-password }}
token-name: ${{ inputs.central-token-username }}
- name: Await
uses: ./.github/actions/await-http-resource
with:
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ jobs:
toolchain: false
- version: 21
toolchain: true
- version: 23
- version: 24
toolchain: true
exclude:
- os:
5 changes: 2 additions & 3 deletions .github/workflows/release-milestone.yml
Original file line number Diff line number Diff line change
@@ -61,10 +61,9 @@ jobs:
- name: Sync to Maven Central
uses: ./.github/actions/sync-to-maven-central
with:
central-token-password: ${{ secrets.CENTRAL_TOKEN_PASSWORD }}
central-token-username: ${{ secrets.CENTRAL_TOKEN_USERNAME }}
jfrog-cli-config-token: ${{ secrets.JF_ARTIFACTORY_SPRING }}
ossrh-s01-staging-profile: ${{ secrets.OSSRH_S01_STAGING_PROFILE }}
ossrh-s01-token-password: ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }}
ossrh-s01-token-username: ${{ secrets.OSSRH_S01_TOKEN_USERNAME }}
spring-framework-version: ${{ needs.build-and-stage-release.outputs.version }}
promote-release:
name: Promote Release
5 changes: 2 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -60,10 +60,9 @@ jobs:
- name: Sync to Maven Central
uses: ./.github/actions/sync-to-maven-central
with:
central-token-password: ${{ secrets.CENTRAL_TOKEN_PASSWORD }}
central-token-username: ${{ secrets.CENTRAL_TOKEN_USERNAME }}
jfrog-cli-config-token: ${{ secrets.JF_ARTIFACTORY_SPRING }}
ossrh-s01-staging-profile: ${{ secrets.OSSRH_S01_STAGING_PROFILE }}
ossrh-s01-token-password: ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }}
ossrh-s01-token-username: ${{ secrets.OSSRH_S01_TOKEN_USERNAME }}
spring-framework-version: ${{ needs.build-and-stage-release.outputs.version }}
promote-release:
name: Promote Release
2 changes: 1 addition & 1 deletion .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@ jobs:
distribution: 'liberica'
java-version: 17
- name: Set Up Gradle
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4.2.2
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
with:
cache-read-only: false
- name: Configure Gradle Properties
2 changes: 1 addition & 1 deletion .sdkmanrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Enable auto-env through the sdkman_auto_env config
# Add key=value pairs of SDKs to use below
java=24-librca
java=24.0.2-librca
17 changes: 6 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -2,11 +2,11 @@ plugins {
id 'io.freefair.aspectj' version '8.13.1' apply false
// kotlinVersion is managed in gradle.properties
id 'org.jetbrains.kotlin.plugin.serialization' version "${kotlinVersion}" apply false
id 'org.jetbrains.dokka' version '1.9.20'
id 'org.jetbrains.dokka'
id 'com.github.bjornvester.xjc' version '1.8.2' apply false
id 'io.github.goooler.shadow' version '8.1.8' apply false
id 'me.champeau.jmh' version '0.7.2' apply false
id "net.ltgt.errorprone" version "4.1.0" apply false
id "io.spring.nullability" version "0.0.1" apply false
}

ext {
@@ -57,30 +57,25 @@ configure([rootProject] + javaProjects) { project ->
apply from: "${rootDir}/gradle/ide.gradle"

dependencies {
testImplementation("org.junit.jupiter:junit-jupiter-api")
testImplementation("org.junit.jupiter:junit-jupiter-params")
testImplementation("org.junit.platform:junit-platform-suite-api")
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("org.junit.platform:junit-platform-suite")
testImplementation("org.mockito:mockito-core")
testImplementation("org.mockito:mockito-junit-jupiter")
testImplementation("io.mockk:mockk")
testImplementation("org.assertj:assertj-core")
// Pull in the latest JUnit 5 Launcher API to ensure proper support in IDEs.
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testRuntimeOnly("org.junit.platform:junit-platform-suite-engine")
testRuntimeOnly("org.apache.logging.log4j:log4j-core")
}

ext.javadocLinks = [
"https://docs.oracle.com/en/java/javase/17/docs/api/",
"https://jakarta.ee/specifications/platform/11/apidocs/",
"https://docs.jboss.org/hibernate/orm/5.6/javadocs/",
"https://eclipse.dev/aspectj/doc/latest/runtime-api/",
"https://www.quartz-scheduler.org/api/2.3.0/",
"https://hc.apache.org/httpcomponents-client-5.4.x/current/httpclient5/apidocs/",
"https://hc.apache.org/httpcomponents-client-5.5.x/current/httpclient5/apidocs/",
"https://projectreactor.io/docs/test/release/api/",
"https://junit.org/junit4/javadoc/4.13.2/",
"https://junit.org/junit5/docs/5.12.2/api/",
"https://docs.junit.org/5.13.4/api/",
"https://www.reactive-streams.org/reactive-streams-1.0.3-javadoc/",
//"https://javadoc.io/static/io.rsocket/rsocket-core/1.1.1/",
"https://r2dbc.io/spec/1.0.0.RELEASE/api/",
1 change: 1 addition & 0 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@ ext {
dependencies {
checkstyle "io.spring.javaformat:spring-javaformat-checkstyle:${javaFormatVersion}"
implementation "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}"
implementation "org.jetbrains.dokka:dokka-gradle-plugin:2.0.0"
implementation "com.tngtech.archunit:archunit:1.4.0"
implementation "org.gradle:test-retry-gradle-plugin:1.6.2"
implementation "io.spring.javaformat:spring-javaformat-gradle-plugin:${javaFormatVersion}"
2 changes: 1 addition & 1 deletion buildSrc/config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
<module name="io.spring.javaformat.checkstyle.check.SpringHeaderCheck">
<property name="fileExtensions" value="java"/>
<property name="headerType" value="apache2"/>
<property name="headerCopyrightPattern" value="20\d\d-20\d\d"/>
<property name="headerCopyrightPattern" value="20\d\d-present"/>
<property name="packageInfoHeaderType" value="none"/>
</module>
<module name="com.puppycrawl.tools.checkstyle.checks.NewlineAtEndOfFileCheck"/>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2025 the original author or authors.
* Copyright 2002-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -50,7 +50,7 @@ public void apply(Project project) {
project.getPlugins().apply(CheckstylePlugin.class);
project.getTasks().withType(Checkstyle.class).forEach(checkstyle -> checkstyle.getMaxHeapSize().set("1g"));
CheckstyleExtension checkstyle = project.getExtensions().getByType(CheckstyleExtension.class);
checkstyle.setToolVersion("10.23.1");
checkstyle.setToolVersion("11.0.0");
checkstyle.getConfigDirectory().set(project.getRootProject().file("src/checkstyle"));
String version = SpringJavaFormatPlugin.class.getPackage().getImplementationVersion();
DependencySet checkstyleDependencies = project.getConfigurations().getByName("checkstyle").getDependencies();
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2025 the original author or authors.
* Copyright 2002-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,7 +26,6 @@
import org.gradle.api.plugins.JavaPluginExtension;
import org.gradle.api.tasks.compile.JavaCompile;
import org.gradle.jvm.toolchain.JavaLanguageVersion;
import org.gradle.jvm.toolchain.JvmVendorSpec;

/**
* {@link Plugin} that applies conventions for compiling Java sources in Spring Framework.
@@ -86,7 +85,6 @@ public void apply(Project project) {
*/
private static void applyToolchainConventions(Project project) {
project.getExtensions().getByType(JavaPluginExtension.class).toolchain(toolchain -> {
toolchain.getVendor().set(JvmVendorSpec.BELLSOFT);
toolchain.getLanguageVersion().set(DEFAULT_LANGUAGE_VERSION);
});
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2025 the original author or authors.
* Copyright 2002-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,10 @@
package org.springframework.build;

import org.gradle.api.Project;
import org.gradle.api.tasks.SourceSet;
import org.gradle.api.tasks.SourceSetContainer;
import org.jetbrains.dokka.gradle.DokkaExtension;
import org.jetbrains.dokka.gradle.DokkaPlugin;
import org.jetbrains.kotlin.gradle.dsl.JvmTarget;
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion;
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile;
@@ -28,24 +32,62 @@
public class KotlinConventions {

void apply(Project project) {
project.getPlugins().withId("org.jetbrains.kotlin.jvm",
(plugin) -> project.getTasks().withType(KotlinCompile.class, this::configure));
project.getPlugins().withId("org.jetbrains.kotlin.jvm", plugin -> {
project.getTasks().withType(KotlinCompile.class, this::configure);
if (project.getLayout().getProjectDirectory().dir("src/main/kotlin").getAsFile().exists()) {
project.getPlugins().apply(DokkaPlugin.class);
project.getExtensions().configure(DokkaExtension.class, dokka -> configure(project, dokka));
project.project(":framework-api").getDependencies().add("dokka", project);
}
});
}

private void configure(KotlinCompile compile) {
compile.compilerOptions(options -> {
options.getApiVersion().set(KotlinVersion.KOTLIN_2_1);
options.getLanguageVersion().set(KotlinVersion.KOTLIN_2_1);
options.getApiVersion().set(KotlinVersion.KOTLIN_2_2);
options.getLanguageVersion().set(KotlinVersion.KOTLIN_2_2);
options.getJvmTarget().set(JvmTarget.JVM_17);
options.getJavaParameters().set(true);
options.getAllWarningsAsErrors().set(true);
options.getFreeCompilerArgs().addAll(
"-Xsuppress-version-warnings",
"-Xjsr305=strict", // For dependencies using JSR 305
"-opt-in=kotlin.RequiresOptIn",
"-Xjdk-release=17" // Needed due to https://youtrack.jetbrains.com/issue/KT-49746
"-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
);
});
}

private void configure(Project project, DokkaExtension dokka) {
dokka.getDokkaSourceSets().forEach(sourceSet -> {
sourceSet.getSourceRoots().setFrom(project.file("src/main/kotlin"));
sourceSet.getClasspath()
.from(project.getExtensions()
.getByType(SourceSetContainer.class)
.getByName(SourceSet.MAIN_SOURCE_SET_NAME)
.getOutput());
var externalDocumentationLinks = sourceSet.getExternalDocumentationLinks();
var springVersion = project.getVersion();
externalDocumentationLinks.register("spring-framework", spec -> {
spec.url("https://docs.spring.io/spring-framework/docs/" + springVersion + "/javadoc-api/");
spec.packageListUrl("https://docs.spring.io/spring-framework/docs/" + springVersion + "/javadoc-api/element-list");
});
externalDocumentationLinks.register("reactor-core", spec ->
spec.url("https://projectreactor.io/docs/core/release/api/"));
externalDocumentationLinks.register("reactive-streams", spec ->
spec.url("https://www.reactive-streams.org/reactive-streams-1.0.3-javadoc/"));
externalDocumentationLinks.register("kotlinx-coroutines", spec ->
spec.url("https://kotlinlang.org/api/kotlinx.coroutines/"));
externalDocumentationLinks.register("hamcrest", spec ->
spec.url("https://javadoc.io/doc/org.hamcrest/hamcrest/2.1/"));
externalDocumentationLinks.register("jakarta-servlet", spec -> {
spec.url("https://javadoc.io/doc/jakarta.servlet/jakarta.servlet-api/latest/");
spec.packageListUrl("https://javadoc.io/doc/jakarta.servlet/jakarta.servlet-api/latest/element-list");
});
externalDocumentationLinks.register("rsocket-core", spec ->
spec.url("https://javadoc.io/static/io.rsocket/rsocket-core/1.1.1/"));
});
}

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2025 the original author or authors.
* Copyright 2002-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Loading