libyear-gradle-plugin icon indicating copy to clipboard operation
libyear-gradle-plugin copied to clipboard

Ignore transitive dependencies

Open JP95Git opened this issue 1 year ago • 4 comments
trafficstars

I have a library in my build.gradle with this configuration:

repositories {
  mavenCentral()
  maven {
    url "https://jitpack.io"
  }
}

dependencies {
  implementation("com.github.Bombe:jFCPlib:v0.1.6")
}

This library is the recent version, but it requires a transitive dependency named "Guava". libyear complaines that Guava is outdated, but there is nothing I can do to fix this, because the author of jFCPlib seems to have abandoned the project. So it would be nice if it is possible to exclude such transitive dependencies from libyear, if possible via settings.

JP95Git avatar Mar 19 '24 21:03 JP95Git

I'm working on adding this because I want it too.

Breefield avatar Oct 03 '24 17:10 Breefield

Thank you @breefield I’d be looking forward to a PR. Optionally limiting the report to “primary” / “first tier” / “non transitive” dependencies would make a useful addition to the plugin.

f4lco avatar Oct 03 '24 18:10 f4lco

Ah yes, let me swap this boolean with an integer and then I'll modify the recursion logic to track what tier the dep is at to ignore.

Breefield avatar Oct 03 '24 21:10 Breefield

@f4lco the PR is ready to review; I’ve added a few other feature PRs I’d love consideration of!

Breefield avatar Oct 06 '24 16:10 Breefield

Thanks, it works.

I used this settings in build.gradle:

plugins {
	id "java"
	id "com.libyear.libyear-gradle-plugin" version "0.2.0"
}

libyear {
	failOnError = false
}

JP95Git avatar Oct 16 '24 21:10 JP95Git