Prior to this commit, the `apiDiff` custom Gradle task would only use the configured repositories in the build to generated the API diff report. This causes issues when the report has to be generated against a previous milestone: the Spring Framework build only relies on Maven Central and a specific `libs-spring-framework-build` repository for building the project. In this case, the task cannot resolve the previous milestone artifacts to generate the report. This commit improves the `ApiDiffPlugin` to automatically add the Spring Milestone repository to the root project configuration when the task is executed. Fixes gh-27928 |
||
---|---|---|
.. | ||
src/main/java/org/springframework/build | ||
README.md | ||
build.gradle | ||
gradle.properties | ||
settings.gradle |
README.md
Spring Framework Build
This folder contains the custom plugins and conventions for the Spring Framework build.
They are declared in the build.gradle
file in this folder.
Build Conventions
Compiler conventions
The org.springframework.build.compile
plugin applies the Java compiler conventions to the build.
Build Plugins
Optional dependencies
The org.springframework.build.optional-dependencies
plugin creates a new optional
Gradle configuration - it adds the dependencies to the project's compile and runtime classpath
but doesn't affect the classpath of dependent projects.
This plugin does not provide a provided
configuration, as the native compileOnly
and testCompileOnly
configurations are preferred.
API Diff
This plugin uses the Gradle JApiCmp plugin to generate API Diff reports for each Spring Framework module. This plugin is applied once on the root project and creates tasks in each framework module. Unlike previous versions of this part of the build, there is no need for checking out a specific tag. The plugin will fetch the JARs we want to compare the current working version with. You can generate the reports for all modules or a single module:
./gradlew apiDiff -PbaselineVersion=5.1.0.RELEASE
./gradlew :spring-core:apiDiff -PbaselineVersion=5.1.0.RELEASE
The reports are located under build/reports/api-diff/$OLDVERSION_to_$NEWVERSION/
.