Skip to content

Conversation

@hankem
Copy link
Member

@hankem hankem commented Apr 27, 2025

Unlike the manual dependency management in the Map ext.dependency, the Gradle version catalog libs.version.toml is recognized by dependabot.
Dependency updates (like #1440) should be triggered automatically (cf. hankem#7), so we could probably revert #672 (although the daily nagging helps to remember that a new version is available 🙈).

@hankem hankem requested a review from codecholeric April 27, 2025 18:43
@hankem hankem marked this pull request as draft April 27, 2025 18:54
@hankem hankem marked this pull request as ready for review April 27, 2025 21:23
@codecholeric
Copy link
Collaborator

Thanks a lot, that looks like a really good idea to improve maintainability 😃 I finally found some time and added some fixup suggestions, please let me know what you think!

@hankem
Copy link
Member Author

hankem commented Jun 14, 2025

Cool, thank you! I'm happy to include these.

hankem added 4 commits June 14, 2025 16:36
Signed-off-by: Manfred Hanke <Manfred.Hanke@tngtech.com>
Signed-off-by: Peter Gafert <peter.gafert@archunit.org>
`it` in the `exclude(dependency { /*...*/ })` closure of
[DependencyFilter](https://github.com/GradleUp/shadow/blob/8.3.6/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/internal/DependencyFilter.groovy)
is a [`org.gradle.api.artifacts.ResolvedDependency`](https://docs.gradle.org/current/javadoc/org/gradle/api/artifacts/ResolvedDependency.html),
whose [`name`](https://github.com/gradle/gradle/blob/v8.13.0/platforms/software/dependency-management/src/main/java/org/gradle/api/internal/artifacts/DefaultResolvedDependency.java#L76-L78) is a `String`.

When the comparison `it.name != dependency.guava` was introduced with 18c5d18,
`dependency.guava` was String that could be compared against `it.name`,
but 82d61ad has changed this those to a `Map`.

However `dependency.guava` is relocated anyway – and hence removed by the `removeDuplicateThirdParty` task (as it is transitively available in `archunit.jar`),
so we can simply drop `dependency.guava` from not being excluded in the `shadowJar`.

Signed-off-by: Manfred Hanke <Manfred.Hanke@tngtech.com>
The [version catalog](https://docs.gradle.org/current/userguide/version_catalogs.html) `libs.version.toml`
is [recognized by dependabot](https://docs.github.com/en/code-security/dependabot/ecosystems-supported-by-dependabot/supported-ecosystems-and-repositories#gradle).

Signed-off-by: Manfred Hanke <Manfred.Hanke@tngtech.com>
Signed-off-by: Peter Gafert <peter.gafert@archunit.org>
introducing a separate catalog for example dependencies
to make it easier to see which dependencies are really meant for ArchUnit in all places.

Signed-off-by: Manfred Hanke <Manfred.Hanke@tngtech.com>
Signed-off-by: Peter Gafert <peter.gafert@archunit.org>
@hankem hankem force-pushed the version-catalog branch from 9082320 to 2f57b05 Compare June 14, 2025 14:36
@codecholeric codecholeric merged commit 74933b0 into main Jun 15, 2025
26 checks passed
@codecholeric codecholeric deleted the version-catalog branch June 15, 2025 10:49
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.

3 participants