Description
Encountered this particular problem when attempting to solve controlsfx/controlsfx#1195 (comment)
The Ikonli project currently provides Java11 only support in its artifacts. All artifacts have a corresponding module-info.java
file. Adding modularity.MixedRelease = 8
to certain projects causes the build to fail with
> Task :ikonli-dashicons-pack:compileModuleInfoJava FAILED
/Users/aalmiray/dev/github/ikonli/icon-packs/ikonli-dashicons-pack/src/main/java/module-info.java:19: error: module not found: org.kordamp.iconli.core
requires org.kordamp.iconli.core;
^
1 error
The multi-release
branch contains the failing setup. Please see https://github.com/aalmiray/ikonli/blob/multi-release/build.gradle
The compileJavaSettings
task from the Kordamp Plugin Suite shows the following settings for :ikonli-dashicons-pack:compileJava
$ gw :ikonli-dashicons-pack:compileJavaSettings --task=compileJava --show-paths
> Task :ikonli-dashicons-pack:compileJavaSettings
compileJava:
excludes:
module-info.java
sourceCompatibility: 11
targetCompatibility: 11
options:
compilerArgs:
--release
8
debug: true
debugOptions:
deprecation: false
failOnError: true
fork: false
forkOptions:
incremental: true
listFiles: false
verbose: false
warnings: true
annotationProcessorPath:
/Users/aalmiray/.gradle/caches/modules-2/files-2.1/org.kordamp.jipsy/jipsy/0.6.0/d2a24537e77d1573cb0c1b3e18cdde1e3ffcdf68/jipsy-0.6.0.jar
/Users/aalmiray/.gradle/caches/modules-2/files-2.1/org.kordamp.jipsy/jipsy-annotations/0.6.0/f7875eba05155c0f80433db5c0b09060924c5f17/jipsy-annotations-0.6.0.jar
classpath:
/Users/aalmiray/dev/github/ikonli/core/ikonli-core/build/classes/java/main
/Users/aalmiray/.gradle/caches/modules-2/files-2.1/org.kordamp.jipsy/jipsy/0.6.0/d2a24537e77d1573cb0c1b3e18cdde1e3ffcdf68/jipsy-0.6.0.jar
/Users/aalmiray/.gradle/caches/modules-2/files-2.1/org.kordamp.jipsy/jipsy-annotations/0.6.0/f7875eba05155c0f80433db5c0b09060924c5f17/jipsy-annotations-0.6.0.jar
Here we can appreciate that the classpath includes a reference to ikonli-core
where the org.kordamp.ikonli.core
module is located. Inspecting the settings for :ikonli-dashicons-pack:compileModuleInfoJava
yields the following
$ gw :ikonli-dashicons-pack:compileJavaSettings --task=compileModuleInfoJava --show-paths
> Task :ikonli-dashicons-pack:compileJavaSettings
compileModuleInfoJava:
sourceCompatibility: 11
targetCompatibility: 11
options:
compilerArgs:
--release
9
debug: true
debugOptions:
deprecation: false
failOnError: true
fork: false
forkOptions:
incremental: true
listFiles: false
verbose: false
warnings: true
sourcepath:
/Users/aalmiray/dev/github/ikonli/icon-packs/ikonli-dashicons-pack/src/main/java
BTW you can get all settings by invoking
$ gw :ikonli-dashicons-pack:javaCompilerSettings --show-paths
Notice that :ikonli-dashicons-pack:compileModuleInfoJava
knows nothing of the output from ikonli-core:compileModuleInfoJava
which contains the compiled module information. Perhaps this is the cause of the problem?