Skip to content

Better error message for typed deps from a TOML file. #17170

@yogurtearl

Description

@yogurtearl

put this in your version catalog TOML:

test-containers = { module = "org.testcontainers:testcontainers", version.ref = "testContainers" }
test-containers-junit = { module= "org.testcontainers:junit-jupiter", version.ref="testContainers" }

Expected Behavior

Error message with more detail and a suggested remediation.

org.gradle.api.InvalidUserDataException: Cannot generate accessors for test because it contains both aliases and groups of the same name: [containers]
> Cannot generate accessors for test because it contains both aliases and groups of the same name: [containers]
[test-containers] conflicts with [test-containers-junit], add a suffix to [test-containers] to avoid this issue. 
E.g. change [test-containers] to [test-containers-mysuffix] 

Current Behavior

you will get this error:

org.gradle.api.InvalidUserDataException: Cannot generate accessors for test because it contains both aliases and groups of the same name: [containers]
> Cannot generate accessors for test because it contains both aliases and groups of the same name: [containers]

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions