Gradle-License-Report icon indicating copy to clipboard operation
Gradle-License-Report copied to clipboard

ExcludeTransitiveDependenciesFilter excluded all sub-project dependencies as well

Open scottrobey opened this issue 3 years ago • 4 comments

Very cool plugin by the way!

Using Gradle 6.8.3 and configuration something like this:

plugins {
  id 'com.github.jk1.dependency-license-report' version '1.17'
}

licenseReport {
  projects = [project] + project.subprojects - project.findProject('qaTest') - project.findProject('testutils')

  filters = [new ExcludeTransitiveDependenciesFilter()]
}

I noticed that the report generated only contained dependencies directly listed in my top-level build.gradle and didn't include any first-order dependencies from sub-projects, like I was expecting.

Is this by-design? Or a bug? If this is by-design I apologize for opening the issue, feel free to close it. And if so I'll try to write a custom filter that behaves as I was expecting: including first-order dependencies from Gradle sub-projects, but excluding their transitive dependencies.

scottrobey avatar Aug 11 '22 00:08 scottrobey

I ended up writing my own filter plugin that behaves as I described above. Let me know if you'd like me to create a PR to add it to this project.

scottrobey avatar Aug 11 '22 05:08 scottrobey

Can you share that?

eygraber avatar Sep 21 '22 21:09 eygraber

I ended up writing my own filter plugin that behaves as I described above. Let me know if you'd like me to create a PR to add it to this project.

@scottrobey Indeed, as @eygraber asked, could you share that filter plugin? Running into the same issue.

mvdbos avatar Oct 12 '22 13:10 mvdbos

Hi @scottrobey, can you share your filter plugin please ? 😄

thsbt avatar Feb 08 '23 13:02 thsbt