Gradle plugin dependency problem

Lennart Börjeson lenborje at
Mon Dec 3 10:12:55 UTC 2018

Is this the right place to ask questions on the gradle plugin (org.openjfx.javafxplugin) ?

I'm trying to migrate to Java 11 and openjfx. I have a gradle setup with multiple projects, which seems to be problematic.

Base: Mostly non-GUI, code but still some references to javafx
GUI: The javafx GUI, depends on Base
Release: Release artefact packaging, depends on both Base and GUI.

The basic problem seems to be I can't use the org.openjfx.javafxplugin in a project which another projects depends on, since the plugin apparently injects the javafx library artefacts *after" the configuration phase.

The relevant section of my build.gradle in the Base project is:


plugins {
  id 'java'
  id 'maven'
  id 'application'
  id 'wrapper'
  id 'eclipse'
  id "me.champeau.gradle.jmh" version '0.4.6'
  id 'org.openjfx.javafxplugin' version '0.0.5'

javafx {
    modules = [ 'javafx.controls' ]


If I remove the javafx section, the gradle can execute, but my project won't build. :-(

(I can't resolve this by moving all javafx usage to the GUI project, since the Release project (release artefact packaging) would still depend on GUI.)

Cf. error below:

$ ./gradlew build

> Configure project :
allProjects: Base: project.version=1.6.10-SNAPSHOT
allProjects: GUI: project.version=1.6.10-SNAPSHOT
allProjects: Release: project.version=1.6.10-SNAPSHOT

> Configure project :Base
test: configure

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':Base'.
> Cannot change dependencies of configuration ':Base:compile' after it has been included in dependency resolution.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at


More information about the openjfx-dev mailing list