Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v5.1.0+] Ignoring duplicate-dependency-rule from centralized dependency definitions #67

Closed
dotnal opened this issue Nov 3, 2016 · 1 comment

Comments

@dotnal
Copy link

dotnal commented Nov 3, 2016

Hi again,

First off, just wanted to say thanks for the hard work on this plugin! Heaps appreciated, and sorry for this long feedback loop:

Related to #42 and #43:

Configuration (gradle ver: 2.14)

gradleLint.rules = ['duplicate-dependency-class', 'overridden-dependency-version']
apply from: 'dependencies.gradle'

dependencies.gradle

ext.deps = [
    derby: "org.apache.derby:derby:10.4.2.0",
    derbytools: "org.apache.derby:derbytools:10.4.2.0"
]

Ignoring duplicate-dependency-class

gradleLint.ignore('duplicate-dependency-class') {
    compile deps.derby
}
runtime deps.derbytools

generates the errors
org.apache.derby:derby:10.4.2.0 in configuration 'runtime' has 15 classes duplicated by org.apache.derby:derbytools:10.4.2.0 (no auto-fix available)

org.apache.derby:derby:10.4.2.0 in configuration 'compile' has 15 classes duplicated by org.apache.derby:derbytools:10.4.2.0 (no auto-fix available)

This occurs from v5.1.0 upwards (after the fix for #43 was implemented).

@jkschneider
Copy link
Contributor

@dotnal The root cause here is that Gradle Lint did not attempt to evaluate extension property-driven dependencies (including to determine which ones were ignored). I think there should be some limit on how much sophistication we should add for evaluating arbitrary code to identify dependencies, but I think defining dependencies with extension properties is common enough that it warrants support. This support is included in 6.1.0.

Thanks for the continuing feedback!

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

No branches or pull requests

2 participants