Conversation
Upgrades the build to Gradle 9.7.0 (from 8.9) and migrates the Shadow
plugin from the unmaintained `com.github.johnrengelman.shadow` 7.1.2 to
`com.gradleup.shadow` 9.6.1, with the version moved into the version
catalog. The build scripts are converted to Kotlin DSL, `buildSrc` is
replaced by a `build-logic` included build, and the Gradle best practices
are applied throughout.
Plugin upgrades:
- shadow: johnrengelman 7.1.2 -> com.gradleup.shadow 9.6.1
- rat: 0.8.0 -> 0.8.1
- test-logger: 3.2.0 -> 4.0.0
- versions: com.github.ben-manes 0.51.0 -> io.github.ben-manes 0.61.0
(the `com.github` plugin id is deprecated)
- version-catalog-update: 0.8.5 -> 1.1.1
- licenser 0.6.1 -> replaced by Spotless 8.10.0 (see below)
`org.cadixdev.licenser` had to be replaced: it fails with a
StackOverflowError on Gradle 9 and has had no release since 2021. Spotless
takes over the ASF license header check and apply, so CI now runs
`spotlessCheck` instead of `licenseCheck` and `spotlessApply` replaces
`updateLicenses`. `checkstyle/HEADER.txt` gains the comment markers because
Spotless matches headers verbatim. Formatting of Java sources stays with
spring-javaformat and Apache RAT remains the repository-wide backstop.
Shadow 9 migration details:
- `archiveClassifier.set(null)` -> `archiveClassifier = ""`
- dropped the manual `dependsOn(jar)`, `manifest { inheritFrom ... }` and
`build.dependsOn(shadowJar)`; Shadow 9 wires all three itself
- `components.java.withVariantsFromConfiguration(...) { skip() }` ->
`shadow { addShadowVariantIntoJavaComponent = false }`
- the removed `dependency(Closure)` overload -> explicit
`Spec<ResolvedDependency>`
Best practices applied (docs.gradle.org/current/userguide/best_practices_index.html):
- Kotlin DSL and a `build-logic` composite build instead of `buildSrc`
- repositories declared in the settings files with
`FAIL_ON_PROJECT_REPOS` and `exclusiveContent` filtering
- configuration cache, build cache, parallel execution and UTF-8 encoding
enabled in `gradle.properties`
- `allprojects {}` cross-project configuration removed: `group` moves to
`gradle.properties` and RAT becomes a single root task, which already
covered every subproject directory
- `afterEvaluate` in the POM replaced by a lazy `Property`, and
`pluginManager.withPlugin` used instead of eager plugin checks
- `buildDir` -> `layout.buildDirectory`, `tasks.register`/`configureEach`
throughout, `isolated.rootProject` instead of `rootProject`
- public task name constants instead of hardcoded strings, group and
description on `sourceTar`
- BOM constraints listed explicitly instead of iterating
`rootProject.subprojects`
- `distributionSha256Sum` added to the wrapper properties
Verified that the shaded jar entries are identical to those produced by the
previous build, and that the generated POMs match the released 0.7.0 POMs
apart from genuine dependency version bumps.
Replaces the two named developer entries with a single organization entry, matching how apache/pulsar declares developers in its own POM.
onobc
approved these changes
Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The build is on Gradle 8.9 and uses
com.github.johnrengelman.shadow7.1.2, which has been unmaintained since maintenance moved to the GradleUp organization. Upgrading to Gradle 9.7.0 also requires replacingorg.cadixdev.licenser, which fails with aStackOverflowErroron Gradle 9 and has had no release since 2021.While doing the upgrade, the build is converted to Kotlin DSL and brought in line with the Gradle best practices.
Modifications
Gradle and plugin upgrades
com.github.johnrengelman.shadow7.1.2 (hardcoded in the build script)com.gradleup.shadow9.6.1 (version catalog)com.github.ben-manes0.51.0io.github.ben-manes0.61.0 (thecom.githubid is deprecated)Gradle itself goes from 8.9 to 9.7.0, with
distributionSha256Sumadded to the wrapper properties. Library versions are deliberately untouched; that is whatversionCatalogUpdateis for.Shadow 9 migration
archiveClassifier.set(null)→archiveClassifier = ""dependsOn(jar),manifest { inheritFrom … }andbuild.dependsOn(shadowJar); Shadow 9 wires all three itselfcomponents.java.withVariantsFromConfiguration(…) { skip() }→shadow { addShadowVariantIntoJavaComponent = false }dependency(Closure)overload → an explicitSpec<ResolvedDependency>License header checking
org.cadixdev.licenseris replaced by Spotless, which is actively maintained and is also whatapache/pulsaruses. Formatting of Java sources stays with spring-javaformat; Spotless only enforces the ASF header, and Apache RAT remains the repository-wide backstop.spotlessCheckinstead oflicenseCheckspotlessApplyreplacesupdateLicensesfor adding headerscheckstyle/HEADER.txtgains the/* */markers, because Spotless matches headers verbatimPublished POM
<developers>The two named developer entries are replaced by a single organization entry, matching how
apache/pulsardeclares developers in its own POM:Gradle best practices
build-logicincluded build instead ofbuildSrcFAIL_ON_PROJECT_REPOSandexclusiveContentfilteringgradle.propertiesallprojects {}cross-project configuration removed:groupmoves togradle.properties, and RAT becomes a single root task (it already scanned every subproject directory)afterEvaluatein the POM replaced by a lazyProperty;pluginManager.withPlugininstead of eager plugin checksbuildDir→layout.buildDirectory,tasks.register/configureEachthroughout,isolated.rootProjectinstead ofrootProjectsourceTarrootProject.subprojectsVerifying this change
This change is a build-only change and is covered by the existing CI build.
Verified locally:
./gradlew rat spotlessCheck javadoc check --no-build-cachepasses, including the testcontainers integration tests, with no deprecation warnings from the build scripts under--warning-mode all<developers>change described abovegradle-9.7.0-wrapper.jar.sha256spotlessCheckwas confirmed to catch a stripped header in both.javaand.gradle.ktsfiles, andspotlessApplyrestores it byte-identicallyNotes for reviewers
gradle.propertiesis no longer license-checked. licenser covered it, but Spotless would need a second hash-comment header file, and RAT already excludes the file because the release plugin strips its header when bumping the version. Happy to add it back if preferred.keepUnusedLibrarieswas dropped from theversionCatalogUpdateconfig: version-catalog-update 1.x no longer removes unused entries, so the option no longer exists.checkstylestays pinned at 9.3, which is whatspring-javaformat-checkstyle0.0.48 depends on.versionCatalogUpdatereadsTask.projectat execution time and therefore discards the configuration cache entry. It is a maintenance task outside the CI flows, andnotCompatibleWithConfigurationCachehad no observable effect, so this is documented in a comment rather than worked around.ReportingExtension.file) from its own code. 0.8.1 is the latest release, so this needs an upstream fix.sourceTarproducespulsar-client-reactive-<version>-<version>-src.tar.gzbecausearchiveBaseNamealready embeds the version andarchiveVersionappends it again. Fixing it would change a release artifact name, so it is left for a separate decision.Does this pull request potentially affect one of the following parts:
Documentation
doc-not-neededThis is a build-internal change. The only developer-facing difference is that the license header tasks are now
spotlessCheck/spotlessApply.