Handle null versions in dependency reports; fix "which/that" doc grammar#693
Open
alexander-yevsyukov wants to merge 2 commits into
Open
Handle null versions in dependency reports; fix "which/that" doc grammar#693alexander-yevsyukov wants to merge 2 commits into
null versions in dependency reports; fix "which/that" doc grammar#693alexander-yevsyukov wants to merge 2 commits into
Conversation
null versions in dependency reports; fix "which/that" doc grammar
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates config’s shared Gradle build logic (buildSrc) to (1) avoid emitting invalid Maven XML in the generated dependency POM report when a dependency has no declared version, and (2) apply an English “which/that” grammar pass (plus minor whitespace/copyright updates) across build-logic documentation comments.
Changes:
- Fix
DependencyWriterto omit the<version>element whendependency.versionisnull, preventing<version>null</version>in generated POM dependency reports. - Add a regression test in
DependencyWriterSpecto ensure version-less dependencies do not produce<version>null</version>while versioned dependencies still do. - Apply doc-only grammar/formatting cleanups across multiple
buildSrcKotlin sources and add an archived task note describing the work.
Reviewed changes
Copilot reviewed 36 out of 36 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| buildSrc/src/main/kotlin/io/spine/gradle/report/pom/DependencyWriter.kt | Omit <version> when dependency version is null while writing POM XML. |
| buildSrc/src/test/kotlin/io/spine/gradle/report/pom/DependencyWriterSpec.kt | Add regression test covering omission of null versions in POM output. |
| buildSrc/src/main/kotlin/Strings.kt | KDoc grammar/copyright-year update. |
| buildSrc/src/main/kotlin/LicenseSettings.kt | License header formatting + KDoc grammar tweak. |
| buildSrc/src/main/kotlin/io/spine/gradle/testing/TestKitCoverage.kt | KDoc grammar tweak. |
| buildSrc/src/main/kotlin/io/spine/gradle/RunGradle.kt | KDoc grammar tweak. |
| buildSrc/src/main/kotlin/io/spine/gradle/report/license/Paths.kt | KDoc grammar tweak. |
| buildSrc/src/main/kotlin/io/spine/gradle/report/license/ModuleDataExtensions.kt | KDoc grammar/copyright-year update. |
| buildSrc/src/main/kotlin/io/spine/gradle/report/license/LicenseReporter.kt | KDoc grammar tweak. |
| buildSrc/src/main/kotlin/io/spine/gradle/repo/Repository.kt | KDoc grammar tweak + whitespace cleanup. |
| buildSrc/src/main/kotlin/io/spine/gradle/publish/SpinePublishing.kt | KDoc grammar tweak. |
| buildSrc/src/main/kotlin/io/spine/gradle/publish/PublishingExts.kt | KDoc grammar tweak. |
| buildSrc/src/main/kotlin/io/spine/gradle/publish/PublicationHandler.kt | KDoc grammar tweak. |
| buildSrc/src/main/kotlin/io/spine/gradle/publish/JarDsl.kt | KDoc grammar/copyright-year update. |
| buildSrc/src/main/kotlin/io/spine/gradle/publish/IncrementGuard.kt | KDoc grammar tweak. |
| buildSrc/src/main/kotlin/io/spine/gradle/publish/GitHubPackages.kt | KDoc grammar/copyright-year update (and touched security-relevant wording). |
| buildSrc/src/main/kotlin/io/spine/gradle/publish/CustomPublicationHandler.kt | KDoc grammar/copyright-year update. |
| buildSrc/src/main/kotlin/io/spine/gradle/publish/CheckVersionIncrement.kt | KDoc grammar/copyright-year update. |
| buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/Assemble.kt | KDoc grammar tweak. |
| buildSrc/src/main/kotlin/io/spine/gradle/javascript/JsExtension.kt | KDoc grammar/copyright-year update. |
| buildSrc/src/main/kotlin/io/spine/gradle/javascript/JsEnvironment.kt | KDoc grammar/copyright-year update. |
| buildSrc/src/main/kotlin/io/spine/gradle/javadoc/ExcludeInternalDoclet.kt | KDoc grammar tweak. |
| buildSrc/src/main/kotlin/io/spine/gradle/java/Tasks.kt | KDoc grammar/copyright-year update. |
| buildSrc/src/main/kotlin/io/spine/gradle/github/pages/UpdateGitHubPages.kt | KDoc grammar tweak. |
| buildSrc/src/main/kotlin/io/spine/gradle/github/pages/TaskName.kt | KDoc grammar/copyright-year update. |
| buildSrc/src/main/kotlin/io/spine/gradle/dart/task/IntegrationTest.kt | KDoc grammar tweak. |
| buildSrc/src/main/kotlin/io/spine/gradle/dart/DartExtension.kt | KDoc grammar/copyright-year update. |
| buildSrc/src/main/kotlin/io/spine/gradle/dart/DartEnvironment.kt | KDoc grammar/copyright-year update. |
| buildSrc/src/main/kotlin/io/spine/gradle/ConfigTester.kt | KDoc grammar tweak. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/Kotlin.kt | KDoc grammar tweak. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/CommonsCli.kt | KDoc grammar tweak. |
| buildSrc/src/main/kotlin/io/spine/dependency/Dependency.kt | KDoc grammar/copyright-year update + whitespace cleanup. |
| buildSrc/src/main/kotlin/io/spine/dependency/boms/BomsPlugin.kt | KDoc grammar/copyright-year update. |
| buildSrc/src/main/kotlin/DokkaExts.kt | KDoc grammar tweak. |
| buildSrc/src/main/kotlin/BuildExtensions.kt | Comment punctuation tweak. |
| .agents/tasks/archive/pom-version-null.md | Archived task note documenting the null-version POM fix and verification steps. |
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.
Summary
Two related build-logic changes to
config'sbuildSrc(both float to allconsumer repos via the submodule +
pull):nullversions gracefully in the POM dependency report — afunctional bug fix.
pass.
1. Handle
nullversions in the POM dependency reportThe POM dependency-report generator emitted BOM-managed coordinates (declared
without an explicit version) as the literal
<version>null</version>in everyconsumer repo's generated
docs/dependencies/pom.xml.nullis not a validMaven version, making the report hard to consume by tooling.
Root cause.
DependencyWriter.writeXmlTowrote"version" { xml.text(dependency.version) }unconditionally; for a version-lessdependency
dependency.versionisnull, and theMarkupBuilder.texthelperdoes
value.toString(), turningnullinto the string"null". The data layeralready knew a null version was possible (
deduplicate()guards it withit.version ?: "") — only this emission site did not.Fix. Emit
<version>only when present, mirroring the existing conditionalfor the optional
<scope>element:A version-less dependency now omits
<version>entirely — the correct Mavenrepresentation for a dependency-managed version — instead of emitting invalid
XML. Covered by a new
DependencyWriterSpecregression test(
omit the version of a dependency that declares none).Surfaced by a Copilot review on
SpineEventEngine/compiler#69.
Pre-existing on
master; not introduced by that PR. Same family as the vendoredbuildSrcaudit follow-ups tracked inconfig#691 (fixed
directly here, since it is self-contained).
2. Fix "which/that" grammar in build-logic docs
An English wording pass across ~32
buildSrc/**/*.ktfiles, correctingrestrictive relative clauses ("which" → "that") in KDoc and inline comments,
plus an incidental copyright-year bump (2025 → 2026) on the touched files and
two trivial whitespace cleanups. Doc-only: no executable code changed in these
files.
🤖 Generated with Claude Code
🙌🏻 Updated by @alexander-yevsyukov