Bump Dependency Analysis Gradle Plugin to 3.14.0 and filter R-class duplicate warnings#4321
Closed
rvandermeulen wants to merge 1 commit into
Closed
Bump Dependency Analysis Gradle Plugin to 3.14.0 and filter R-class duplicate warnings#4321rvandermeulen wants to merge 1 commit into
rvandermeulen wants to merge 1 commit into
Conversation
…uplicate warnings R classes are duplicated by design between :app and its library dependencies, so DAGP's duplicate-class detection flags them as false positives. Filter them via excludeRegex rather than disabling the check entirely. autonomousapps/dependency-analysis-gradle-plugin#1335
jonalmeida
requested changes
Jun 1, 2026
Collaborator
There was a problem hiding this comment.
The activity on the linked bug is a bit disappointing, but this type of change will suffice.
My regex-foo is a bit weak off late, but I think we need to make this expression more strict, so that it doesn't catch other classes, but also allows for importing resource strings.
I used this regex test site that checked the expression against some test values:
In the above screenshot, import org.mozilla.fenix.GleanMetrics.RecentSyncedTabs should not have been caught.
Contributor
Author
|
Not entirely sure I agree with the pushback here, but it's also moot because I got a PR landed upstream today to resolve this issue. I'll open a new PR for that DAGP update once it becomes available. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rclasses are duplicated by design between:appand its library dependencies (the app re-generatesR/R$id/etc. for resources it references), so DAGP's duplicate-class detection flags them as false positives, e.g.:Rather than disabling duplicate-class detection entirely (which we still want for genuine classpath conflicts / supply-chain risks), this scopes an
excludeRegexto just theRclasses via theonDuplicateClassWarningshandler.This is tracked upstream in autonomousapps/dependency-analysis-gradle-plugin#1335.