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

Add support for exporting/importing dependency information for multi-licensed modules

Open erdi opened this issue 2 years ago • 2 comments

Currently the only implementation of a DependencyDataImporter which ships with the plugin allows to import from xml. Unfortunately the XmlReportRenderer which can be used with it is lossy - it only exports information about a single license even for modules which are multi-licensed. It looks like JsonReportRenderer is capable of exporting information about multiple licenses per module but unfortunately there is no built-in importer for that format.

In the project I'm using this plugin on there are hundreds of modules. I want to be able to generate an aggregate report at the root. I know that I configure the plugin to apply the project to all subprojects but I don't want to - I want the plugin to generate reports for each submodule separately and then aggregate these because doing it in such smaller chynks will provide a higher chance of build cache hits.

erdi avatar Feb 28 '23 11:02 erdi

I don't thing the JSON reporter outputs more than one. I think it has the same problem as the XML one. (at least I only get one when I use it) - Oh just found the constructor nevermind. Docs on renderers could use help.

fsparv avatar Apr 01 '23 16:04 fsparv

I believe that if you pass false as the second argument to JsonReportRenderer's constructor, onlyOneLicensePerModule, you will get more than one license per module for multi-licensed modules.

erdi avatar Apr 03 '23 14:04 erdi