Open ligi opened 9 years ago
Same here: empty report for a Gradle application project with many dependencies. I feel the license crawler is built to find Maven libraries only.
as a workaround: copy the dependency block to a java project to generate the report - not that pretty but gets the task done ;-)
How does the Android plugin resolve dependencies/configurations?
Right now, it uses the runtime
configuration to generate reports. You can modify that by assigning the reportedConfiguration
or reportedConfigurations
property: https://github.com/RobertFischer/Gradle-License-Report/blob/master/src/main/groovy/com/smokejumperit/gradle/report/DependencyLicenseReport.java#L49-L65
If we could detect that the Android plugin was added, we could change our reportedConfigurations
property default to support whatever the Android plugin's configuration is. I'd happily accept a pull request to do that.
Right now, it uses the
runtime
configuration to generate reports.
Hmm, judging from https://github.com/RobertFischer/Gradle-License-Report/tree/master/build/reports/dependency-license I would have thought by default all configurations are used. If only the runtime
configuration can used, how did you create these reports?
In any case, I believe there are at least two pieces to the puzzle: One is to use the compile
configuration for Android projects (BTW, this fork makes it easy to customize the configurations to take into account via Groovy DSL), the other is that Android projects usually are multi-projects. This means you need to wrap applying the plugin into allprojects
in the root build.gradle
file in order to make the dependencyLicenseReport
task available in those (sub-)projects that actually have the dependencies.
@ligi @johnjohndoe I am not sure how active this project is but I created a gradle-license-plugin for Android users in order to display the "Open Source Dialog" in the Settings menu.
@jaredsburrows Interesting. Are you also aware of https://github.com/hierynomus/license-gradle-plugin?
@sschuberth No I was not. That plugin is for creating headers on source files. Mine is for the "Open Source Dialog" menu like you see in most apps.
That plugin is for creating headers on source files.
Not only. I'm using the downloadLicenses
task to generate reports.
Awesome. Ill have to try it out!
On Jan 6, 2017 9:17 AM, "Sebastian Schuberth" notifications@github.com wrote:
That plugin is for creating headers on source files.
Not only. I'm using the downloadLicenses task to generate reports.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/RobertFischer/Gradle-License-Report/issues/2#issuecomment-270953854, or mute the thread https://github.com/notifications/unsubscribe-auth/ABqMSCMqGjoA3Y2RRnPx-cYK2KqZvY9pks5rPndBgaJpZM4DI-GU .
@sschuberth I just tried this out on an app I work on. The license report is empty. It seems you have to add in the "license" dsl with explicit params to get it to work. Also, it seems that the webpage is not meant for mobile:
I'll continue to take feedback and work on my light weight plugin.
Just FYI, I wasn't meaning to discourage you to continue working on your plugin. I just wanted to point out a similar project for the sake of possible sharing code / learning from each other.
@sschuberth Oh yeah! I know, thanks for informing me of these other helpful plugins. They all have unique reports that have been helpful to me. I just want something lightweight for Android specifically. Thanks for your information!
it seem to find no configuration -> hence an empty report I see 2 solutions: either throw an exception that it is used in combination with the android plugin or ( preferred ) also be able to resolve dependencies/configurations in combination with the android plugin