Skip to content

Address deprecations - #178

Merged
alexander-yevsyukov merged 7 commits into
masterfrom
trigger-publishing
Jun 8, 2026
Merged

Address deprecations#178
alexander-yevsyukov merged 7 commits into
masterfrom
trigger-publishing

Conversation

@alexander-yevsyukov

@alexander-yevsyukov alexander-yevsyukov commented Jun 8, 2026

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.


Generated by Claude Code

alexander-yevsyukov and others added 7 commits June 8, 2026 15:00
…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
…uDPvy

Address build deprecation warnings: PMD ruleset and test task creation
@codecov

codecov Bot commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.17%. Comparing base (ef6f93b) to head (d1e32fc).

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #178   +/-   ##
=========================================
  Coverage     90.17%   90.17%           
  Complexity      552      552           
=========================================
  Files           122      122           
  Lines          2230     2230           
  Branches        311      311           
=========================================
  Hits           2011     2011           
  Misses           96       96           
  Partials        123      123           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alexander-yevsyukov
alexander-yevsyukov merged commit 2dac492 into master Jun 8, 2026
9 checks passed
@alexander-yevsyukov
alexander-yevsyukov deleted the trigger-publishing branch June 8, 2026 15:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the repository to eliminate build-time deprecation warnings by modernizing PMD configuration and switching Gradle test fixtures away from deprecated eager task creation APIs, alongside regenerating versioned dependency-report artifacts.

Changes:

  • Replace deprecated PMD rule GenericsNaming with TypeParameterNamingConventions and bump copyright year.
  • Update Gradle test fixtures to use tasks.register(name).get() instead of deprecated tasks.create(name).
  • Bump snapshot version references and refresh generated dependency-report outputs.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
version.gradle.kts Bumps versionToPublish snapshot.
psi-java/src/test/kotlin/io/spine/tools/psi/PsiElementExtsSpec.kt Simplifies PSI load helper by removing an unnecessary cast.
plugin-base/src/test/kotlin/io/spine/tools/gradle/task/TaskDependenciesSpec.kt Replaces deprecated eager task creation with lazy registration in tests.
plugin-base/src/test/kotlin/io/spine/tools/gradle/task/GradleTaskTest.kt Replaces deprecated eager task creation with lazy registration in tests.
docs/dependencies/pom.xml Updates generated POM version and adjusts generated first-level dependency list.
docs/dependencies/dependencies.md Refreshes generated dependency report content for the new snapshot.
buildSrc/src/main/kotlin/io/spine/dependency/local/Base.kt Updates buildSrc-managed dependency version constants.
buildSrc/quality/pmd.xml Updates PMD ruleset to avoid a deprecated rule.

Comment on lines 49 to 53
* to a member of `PsiFile`.
*/
private fun loadClass(tempDir: Path) =
(FileSystem.load(tempDir.resolve("Stub.java").apply {
FileSystem.load(tempDir.resolve("Stub.java").apply {
writeText("class Stub {}")
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.

4 participants