Skip to content

Address build deprecation warnings: PMD ruleset and test task creation - #177

Merged
alexander-yevsyukov merged 2 commits into
trigger-publishingfrom
claude/ecstatic-hopper-uDPvy
Jun 8, 2026
Merged

Address build deprecation warnings: PMD ruleset and test task creation#177
alexander-yevsyukov merged 2 commits into
trigger-publishingfrom
claude/ecstatic-hopper-uDPvy

Conversation

@alexander-yevsyukov

Copy link
Copy Markdown
Contributor

Summary

Clears the two classes of deprecation warning surfaced when building tool-base.

PMD settings

pmdMain warned that category/java/codestyle.xml/GenericsNaming is deprecated (since PMD 7.17.0) and scheduled for removal in PMD 8.0.0:

Warning at buildSrc/quality/pmd.xml:63:5
  Discontinue using Rule name category/java/codestyle.xml/GenericsNaming as it is
  scheduled for removal from PMD. PMD 8.0.0 will remove support for this Rule.

Replaced it with its official successor TypeParameterNamingConventions, which enforces the same single-uppercase-letter convention for type parameters by default. Copyright year bumped to 2026.

buildSrc/quality/pmd.xml is distributed by the config repository, so the same change is propagated there (see the companion PR in SpineEventEngine/config). The two files are kept byte-identical.

Test code

compileTestKotlin warned on the eager, deprecated TaskContainer.create(String): Task in GradleTaskTest and TaskDependenciesSpec:

w: .../task/GradleTaskTest.kt:48:34 'fun create(name: String): Task' is deprecated. Deprecated in Java.
w: .../task/TaskDependenciesSpec.kt:46:34 'fun create(name: String): Task' is deprecated. Deprecated in Java.

Switched all six task fixtures to the lazy project.tasks.register(name).get(). .get() realises the provider to the Task the assertions need — no behaviour change.

Verification

The full Gradle build could not be run in this environment: its network policy blocks the Spine SNAPSHOT plugins the root build resolves (jvm-tool-plugins-all, protobuf-setup-plugins return 403 from GitHub Packages, Google Artifact Registry, and mycloudrepo). Instead:

  • the PMD change was validated against PMD 7.25.0's own ruleset XML — the successor rule exists, is not deprecated, and defaults to the same convention;
  • the test change is a type-safe, standard Gradle lazy-API migration.

CI is the final check.

https://claude.ai/code/session_014TVLouXfDWCg1sTQVW3ssM


Generated by Claude Code

claude added 2 commits June 8, 2026 15:40
…gConventions`

PMD 7.25.0 deprecated `category/java/codestyle.xml/GenericsNaming` (scheduled for removal in PMD 8.0.0) in favour of `TypeParameterNamingConventions`, which enforces the same single uppercase-letter convention for type parameters by default. The `pmdMain` task printed a deprecation warning for the rule; switching to the successor clears it.

https://claude.ai/code/session_014TVLouXfDWCg1sTQVW3ssM
… tests

Gradle deprecated the eager `TaskContainer.create(String): Task` overload, so `compileTestKotlin` warned on the task fixtures in `GradleTaskTest` and `TaskDependenciesSpec`. Build each fixture with `project.tasks.register(name).get()`; `.get()` realises the provider to the `Task` the assertions need, with no behaviour change.

https://claude.ai/code/session_014TVLouXfDWCg1sTQVW3ssM
@alexander-yevsyukov
alexander-yevsyukov changed the base branch from master to trigger-publishing June 8, 2026 15:44
@alexander-yevsyukov
alexander-yevsyukov marked this pull request as ready for review June 8, 2026 15:46
@alexander-yevsyukov
alexander-yevsyukov merged commit d1e32fc into trigger-publishing Jun 8, 2026
4 of 5 checks passed
@alexander-yevsyukov
alexander-yevsyukov deleted the claude/ecstatic-hopper-uDPvy branch June 8, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants