darkmoon_uk08/19/2019, 9:55 PM
...while trying to make an Multiplatform library with an Android and JavaFX target. The OpenJfx plugin putting a dependency on the Java
The 'java' plugin has been applied, but it is not compatible with the Android plugins.
plugin is causing it, in this file: https://github.com/openjfx/javafx-gradle-plugin/blob/master/src/main/java/org/openjfx/gradle/tasks/ExecTask.java This means it is not a trivial fix 😕 The crux of the issue is the way the Android Plugin refuses to execute in the presence of the
plugin; I can see two routes to go here: 1) Make a PR vs the OpenJfx project to make the plugin it adheres to for execution more configurable. 2) Deal with the Android Plugin head on - while this seems like the more daunting task, as there may be deeper issues, @abreslav left a curious comment against a similar issue report, here: https://discuss.kotlinlang.org/t/kotlin-android-gradle/789 "Since Andriod's Gradle is rather peculiar, we have to essentially build a separate Gradle plugin for Kotlin on Android. We are working on it, you can contribute if you feel like it." ...which suggests JB may have considered this back in '13, but the exclusion problem persists.
louiscad08/19/2019, 10:11 PM
darkmoon_uk08/19/2019, 10:13 PM
louiscad08/19/2019, 10:46 PM
darkmoon_uk08/19/2019, 11:09 PM
plugin so it can emplace itself as a dependency of the
task, ensuring it gets to perform module configuration before any App compile. It should be possible to implement so that it has an affinity with 'Kotlin first' (✨), before attempting to load the Java plugin.
abreslav08/20/2019, 3:43 AM
gildor08/20/2019, 6:29 AM
darkmoon_uk08/20/2019, 6:32 AM
. Practical solution for my project right now is just to do manually what the OpenJfx plugin tries to provide as a convenience: which is just to set up the right Java Modules.
plugin, falling back to the default
plugin where multiplatform isn't present.
gildor08/20/2019, 6:58 AM
there are probably good reasons it excludesThere is, java plugin used to build Jars, Android build and packaging process is completely different
falling back to the defaultI believe plugin just shouldn’t apply application automatically, instead configure own run task if application plugin is applied to the projectplugin where multiplatform isn’t present
h0tk3y08/20/2019, 10:12 AM
plugin is applied. Perhaps a third-party plugin could replace this logic by creating this task in a similar way using the Kotlin/JVM target. This logic could then be contributed to OpenJfx.