Open-Source Wikis

/

Spring Framework

/

How to contribute

/

Tooling

spring-projects/spring-framework

Tooling

What's in the build system, what each plugin does, and where to look when build behavior is surprising.

Build system

The project uses Gradle with the Gradle wrapper (gradlew / gradlew.bat). The Gradle version is pinned in gradle/wrapper/gradle-wrapper.properties. The wrapper guarantees reproducible builds across machines.

Custom build logic lives in buildSrc/, which is compiled and applied to the rest of the build automatically.

Gradle plugins applied

The root build.gradle declares (selected highlights):

Plugin Purpose
io.freefair.aspectj AspectJ compilation (spring-aspects)
org.jetbrains.kotlin.plugin.serialization Kotlin kotlinx.serialization support
org.jetbrains.dokka Kotlin API documentation
com.github.bjornvester.xjc JAXB schema-to-Java code generation (spring-oxm)
com.gradleup.shadow Shading (repackaging) ASM/CGLIB/Objenesis into spring-core
me.champeau.jmh JMH benchmark harness
io.spring.nullability Build-time nullness checking
io.spring.develocity.conventions Develocity (build scans) integration

Spring's own conventions plugins

Defined in buildSrc/:

  • org.springframework.build.localdev — Local-developer ergonomics (cache settings, repository order)
  • org.springframework.build.conventions — Code-quality conventions (Checkstyle, Javadoc, Compile options)
  • org.springframework.build.runtimehints-agent — Java agent for AOT runtime hints validation
  • org.springframework.build.multiReleaseJar — Multi-Release JAR construction (used by spring-core)
  • org.springframework.build.shadow.ShadowSource — Source-level shading helpers

These conventions plugins are the central place for the framework's compile/test/check defaults. When you wonder "why does every module behave like this?", check buildSrc/.

CI workflows

The project's CI lives in .github/workflows/:

Workflow When it runs What it does
ci.yml Daily cron + on PR Matrix build on Linux × Java 21 × Java 25
build-and-deploy-snapshot.yml Push to main Snapshot build + publish
build-pull-request.yml PRs Validate build for community contributions
release.yml Tag Cut a release artifact
release-milestone.yml Milestone tag Cut a milestone (M, RC) artifact
deploy-docs.yml Push Build and publish reference docs
update-antora-ui-spring.yml Periodic Refresh the Antora docs theme
verify.yml PR / nightly Full project verification
backport-bot.yml Issue/PR action Suggest backports for fixes

CI uses GitHub-hosted runners with the actions/checkout@v6 action and the project's Gradle toolchain configuration.

Develocity (build scans)

Every build can publish a scan to https://ge.spring.io/. The io.spring.develocity.conventions plugin handles the configuration. The published scan URL is captured to build/build-scan-uri.txt after each build (see the settings.gradle's buildScanPublished hook).

Code quality gates

Active gates (run by ./gradlew check):

  • Tests — JUnit 5 (./gradlew test)
  • Checkstyle./gradlew checkstyleMain checkstyleTest
  • Nullabilityio.spring.nullability runs as part of compilation
  • Javadoc./gradlew javadoc validates documentation
  • Compile warnings — Treated as errors via -Werror for many modules

Code generation

A few modules generate code at build time:

  • spring-oxm — XJC plugin generates Java classes from XSD test fixtures.
  • spring-context-indexer — Annotation processor that emits a compile-time index for component scanning.
  • AOT processors — Modules use the Spring AOT machinery to generate runtime hints (these are runtime-time, not strictly build-time, but exercised in tests).

Documentation toolchain

Reference documentation uses Antora (Asciidoctor-based):

  • Source: framework-docs/modules/ROOT/
  • Build: ./gradlew antora
  • Output: framework-docs/build/site/index.html

The framework-api/ module aggregates per-module Javadoc into a single browsable site:

  • Build: ./gradlew :framework-api:javadoc
  • Output: framework-api/build/docs/javadoc/index.html

Multi-Release JAR specifics

spring-core is the only module that ships an MRJAR. The convention is configured in spring-core/spring-core.gradle:

multiRelease {
    releaseVersions 21, 24
}

Override classes for those Java versions live in spring-core/src/main/java21/ and spring-core/src/main/java24/.

See also

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Tooling – Spring Framework wiki | Factory