Closed
Description
This is a much needed follow up issue for #20440.
Currently the Spring Framework build is mixing scripts, conventions and dependency information in .gradle
files, some of them externalized in a gradle folder. The goal of this issue is to refactor the current build to scripts and conventions into build plugins. Each project/subproject should then selectively apply those plugins and only describe the specific dependencies in their build file.
Since our last efforts, Gradle had significant improvements and lots of new features that could be useful to Spring Framework.
Here is the list of the tasks for this issue:
- Rewrite the "test source sets" plugin from Groovy to Java
- Do not use the propdeps plugin and replace
provided
/optional
withcompileOnly
and a customoptional
configuration (see spring-core-5.2.0.M3.pom missing netty dependencies #23234) - Do not publish optional/provided dependencies in published POMs
- Move the Java compilation configuration to a convention. The Kotlin one is short and comes with the Kotlin plugin declaration, so we're letting that part in the main build file for now.
- Remove Gradle wrapper customization as script and move it to gradle.properties if necessary
- Move the JDiff to a separate plugin and use Japicmp instead
- Move integration tests to a separate module
- Reorganize tasks and scripts to selectively apply them to one of: root project, framework module, internal module (BOM, coroutines, integration-tests)
- Download the "spring-docs-resources" zip as an URL and do not resolve it as a dependency (see Stop using
libs-*
repo in favour of consistent use of Maven Central #23124) - Use
"spring-*"
as a project name only for Spring Framework published modules. Rename internal modules accordingly ("spring-framework-bom", "spring-core-coroutines"...) - Use Gradle Platform features for publishing the Spring Framework BOM
- Use the standard Gradle "Maven Publish plugin"
- Apply and configure the artifactory publish plugin directly (instead of delegating that to the CI server). This allows us to really control which artifacts are published, without workarounds.