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

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

Open Vampire opened this issue 1 year ago • 3 comments

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 avatar Jun 03 '24 22:06 Vampire

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

Vampire avatar Jun 04 '24 00:06 Vampire

This would be a great improvement for multiplatform projects!

haleyc15243 avatar Jul 30 '24 20:07 haleyc15243

This looks like a very useful change. Is there any roadmap if and if so when this could be merged and released?

ursjoss avatar Oct 24 '25 09:10 ursjoss