jk1 / Gradle-License-Report

A plugin for generating reports about the licenses of third party software using Gradle
Other
322 stars 97 forks source link

License of JavaFX modules cannot be determined - probably the same with Kotlin Multiplatform libraries - a.k.a. variant- / attribute-awareness #313

Open Vampire opened 4 months ago

Vampire commented 4 months ago

The JavaFX libraries contain platform-specific native libraries.

With the JavaFX Gradle plugin 0.1.0+ applied, or also natively after openjdk/jfx#1232 is finished, the JavaFX modules have various OS and architecture dependent feature variants.

With the tactic this plugin uses, this results in the JavaFX modules not being able to be resolved as the necessary attributes are not set to pick one of the variants and thus the resolution fails and due to that no license is recognized, though it would have been available in the (parent) POM.

I did not try, but I guess with KMP project this will be quite the same situation.

I guess for a proper fix of this problem there needs to be some rewrite done. The gradle-versions-plugin for example copies the configurations it wants to check and copies over all the set attributes on that configuration, so that the dependencies are resolved like the build under investigation (or the applied plugins) configured them to do. That plugin needs to copy those configurations, as it changes the version constraints so that the latest version is resolved, so this is most probably not necessary here. I didn't look too closely why you use a detached configuration to resolve the dependency, but maybe there is some other way to do what you need, like just resolving the configuration in question, or using an artifact view, or similar.

Vampire commented 4 months ago

Having a closer look, you only use that to retrieve POMs. I think for that you could simply use an artifact resolution query instead.

haleyc15243 commented 2 months ago

This would be a great improvement for multiplatform projects!