LicenseFinder
LicenseFinder copied to clipboard
LF does not run all package manager 'detectors' in sibling Multi-Project Gradle Setup
In short, we have a multi-project Gradle Setup:
-- Root
---- build.gradle
+--- A
---- build.gradle
+--- B
---- package.json
---- bower.json
---- build.gradle
+--- C
---- build.gradle
Project A: Business objects/logic Project B: Webapp "frontend" Project C: Webapp "backend"
Our Project C
depends on projects A
and B
.
The Project C
build.gradle
file references them as dependencies:
dependencies {
compile(
project(":root:A")
)
runtime(
project(":root:B")
)
}
However, when I run license_finder
in my Project C
directory, I only get the gradle based dependencies from Project B
. None of the npm
or bower
dependencies are listed. If, however, I switch over to my Project B
directory, and run license_finder
it shows all of the gradle
, npm
, and bower
dependencies for Project B
so I know B
has npm
and bower
dependencies and license_finder
can find them.
What's even more interesting, is if I try to use the subproject
command from Project C
, the only output I get is the subprojects' outputs, not also Project B
's dependencies:
// In Project C directory
nk-mbp:webserver a$ license_finder report --subprojects=../B
// returns
// Only subproject B dependencies
// while
// Again, in Project C directory
nk-mbp:webserver a$ license_finder report
// returns
// Project A and C dependencies, but ONLY **GRADLE** based Project B dependencies
So a few thoughts/comments...assuming I'm currently in the Project C
directory:
-
If I run
license_finder
without any switches (e.g. no --recursive or --subprojects) and it's going to bring ingradle
dependencies from ProjectB
, shouldn't it also bring inB
's other package_manager dependencies (e.g. npm, bower, nuget, etc.)? -
If
license_finder
is run with the--subprojects
switch, should it include the current directory's dependencies as the "root" dependency project and then just append any dependencies it finds in the subprojects? Or does it only return what's specifically listed in--subprojects
?
In regards to (2) above, the only way I can get all of A, B, and C's dependencies (gradle, npm, and bower), is, from Directory C
, running this:
license_finder report --subprojects=./ ../B
Sounds like more fishy behavior from the subprojects
functionality. I'll dig in.