Skip to content

refactor(jpa)!: narrow jpa configuration propagation to compile-only and annotation processing scopes - #119

Merged
yannickebongue merged 1 commit into
mainfrom
refactor/narrow-jpa-configuration-propagation
Oct 31, 2026
Merged

yannickebongue merged 1 commit into
mainfrom
refactor/narrow-jpa-configuration-propagation

Conversation

@yannickebongue

Copy link
Copy Markdown
Contributor

Restrict the jpa dependency configuration to propagate platform/BOM version constraints only into compileOnly (or compileOnlyApi when java-library is applied) and annotationProcessor configurations. Previously, constraints also leaked into implementation, runtimeOnly, and api, which could cause unintended transitive dependency resolution.

The jarFile configuration now extends implementation or api (mutually exclusive), matching the narrowed propagation logic.

Also update the plugin documentation to reflect the new behavior and modernize the Kotlin DSL examples (register/jarFile(…) instead of create/jarFileMappings.put).

BREAKING CHANGE: The jpa configuration no longer extends implementation, runtimeOnly, or api. Projects relying on jpa to propagate constraints into those scopes must now declare them explicitly.

Closes #118

…and annotation processing scopes

Restrict the `jpa` dependency configuration to propagate platform/BOM
version constraints only into `compileOnly` (or `compileOnlyApi` when
`java-library` is applied) and `annotationProcessor` configurations.
Previously, constraints also leaked into `implementation`, `runtimeOnly`,
and `api`, which could cause unintended transitive dependency resolution.

The `jarFile` configuration now extends `implementation` or `api`
(mutually exclusive), matching the narrowed propagation logic.

Also update the plugin documentation to reflect the new behavior and
modernize the Kotlin DSL examples (`register`/`jarFile(…)` instead of
`create`/`jarFileMappings.put`).

BREAKING CHANGE: The `jpa` configuration no longer extends
`implementation`, `runtimeOnly`, or `api`. Projects relying on `jpa`
to propagate constraints into those scopes must now declare them
explicitly.
@yannickebongue yannickebongue self-assigned this Oct 31, 2026
@yannickebongue yannickebongue added the documentation Improvements or additions to documentation label Oct 31, 2026
@yannickebongue yannickebongue added maintenance Improvements or additions to documentation plugins Gradle plugin wrappers (Gradle Plugin Portal artifacts) labels Oct 31, 2026
@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

@yannickebongue
yannickebongue merged commit a326bb5 into main Oct 31, 2026
4 checks passed
@yannickebongue
yannickebongue deleted the refactor/narrow-jpa-configuration-propagation branch October 31, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation maintenance Improvements or additions to documentation plugins Gradle plugin wrappers (Gradle Plugin Portal artifacts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REFACTOR] Narrow jpa configuration propagation to prevent application classpath pollution

1 participant