jk1/Gradle-License-Report

ExcludeTransitiveDependenciesFilter excluded all sub-project dependencies as well

scottrobey opened this issue · 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.

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.

Can you share that?

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.

thsbt commented

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