-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Cannot choose between the following variants of JavaFX component modules like org.openjfx:javafx-fxml:21 #159
Comments
I have the same problem. Impossible to use the plugin with Gradle Kotlin DSL.
But it is not possible to configure the platform. It does not take a single quoted string (impossible in kotlin). The type of the property is JavaFXPlatform, but it cannot be set because gradle complains that Val cannot be reassigned
|
Also, following the documentation, the configurations are not possible to set because of a Type Mismatch: it requires a configure closure instead of a string:
|
I actually was able to solve my problem, and it might help you with yours, or at least point you in the right direction. Here is how I solved it, thanks to the answer from Vampire in the Gradle Forums. You can check at the questions and answers here: [https://discuss.gradle.org/t/how-can-i-re-declare-variants-for-a-configuration-using-gradle-kotlin-dsl/46919](Gradle Forum Question 46919) [https://discuss.gradle.org/t/how-can-i-add-an-attribute-disambiguation-rule-for-all-configurations-in-a-project/46940](Gradle Forum Question 46940) Here is the relevant code. What was key in my case is that the attributes were added to configurations that are resolvable:
|
When I upgraded the plugin to version 0.1.0, I encountered an Cannot choose between the following variants of JavaFX component modules error. I've already found a solution in the project's README, but my understanding of Gradle is still quite basic. Could someone help me take a look?
There is my
build.gradle.kts
And there is root project
build.gradle.kts
The text was updated successfully, but these errors were encountered: