Skip to content

TS-48500 Gradle plugin: Accept read-only JaCoCo excludes and JUnit engine excludes - #1004

Merged
stahlbauer merged 5 commits into
masterfrom
ts/48500_accept_read_only_jacoco_excludes
Nov 4, 2026
Merged

stahlbauer merged 5 commits into
masterfrom
ts/48500_accept_read_only_jacoco_excludes

Conversation

@stahlbauer

@stahlbauer stahlbauer commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Fixes TS-48500.

When a Gradle Kotlin DSL build set the excludes of the JaCoCo task extension to a read-only list (excludes = listOf(...)), applying the Teamscale Gradle plugin failed with UnsupportedOperationException (no error message). The plugin added its default excludes to that list in place. The test task action did the same with the JUnit Platform engine excludes, so useJUnitPlatform { excludeEngines = setOf(...) } failed every plain test run.

Changes

  • TeamscalePlugin.configureTestTasks assigns a new list, the build's excludes followed by the plugin's defaults, instead of calling addAll on the build's list. The order is unchanged, and excludes that are null stay null, as before.
  • TestImpactConfigurationAction assigns a new set of engine excludes, the build's engines plus the impacted test engine, instead of calling add on the build's set.
  • Tests:
    • The plugin applies with read-only and with mutable excludes and appends its defaults. The read-only test failed before the fix, and both fail if the plugin stops adding its defaults.
    • The test task action adds the impacted test engine to read-only engine excludes. It failed before the fix.
    • All 25 plugin tests pass.
  • CHANGELOG entry.

Notes for the reviewer

🤖 Generated with Claude Code

The plugin appended its default excludes to the build's excludes list in place, so a read-only list such as Kotlin's listOf(...) made applying the plugin fail with an UnsupportedOperationException. It now assigns a new list with the same content and order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@stahlbauer stahlbauer self-assigned this Nov 3, 2026
stahlbauer and others added 2 commits November 4, 2026 07:37
Teamscale exempts @test methods from the interface comment check, but it
does not resolve the JUnitTest import alias.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test task action added the impacted test engine to the build's engine excludes in place, so a read-only set such as setOf(...) failed every plain test run. The build-excludes tests now also fail when the plugin stops adding its default excludes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@stahlbauer stahlbauer changed the title TS-48500 Gradle plugin: Accept read-only JaCoCo excludes TS-48500 Gradle plugin: Accept read-only JaCoCo excludes and JUnit engine excludes Nov 4, 2026
@stahlbauer stahlbauer closed this Nov 4, 2026
@stahlbauer stahlbauer reopened this Nov 4, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@stahlbauer
stahlbauer enabled auto-merge November 4, 2026 13:50
@stahlbauer
stahlbauer merged commit a60c395 into master Nov 4, 2026
4 checks passed
@DreierF
DreierF deleted the ts/48500_accept_read_only_jacoco_excludes branch November 11, 2026 07:32
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