"Module ___ not found" for run
task (Java 11 with Kotlin/Groovy plugin applied)
#118
Labels
run
task (Java 11 with Kotlin/Groovy plugin applied)
#118
When targeting JDK 11, in a project that has Java, Kotlin, and Groovy plugins applied but has only Java sources,
run
task fails with:It seems to be due to:
run
task gettingbuild/classes/merged
on a module path (as it shouldn't)mergeClasses
task being absent (as it should)Example
This behavior is exemplified on a branch of my project, where
run
fails like below:https://travis-ci.com/tlinkowski/UniJ/builds/127633638#L1234-L1236
For a module targeting JDK 8, it works fine, though:
https://travis-ci.com/tlinkowski/UniJ/jobs/235293201#L1271-L1273
In a debugger, I managed to find out that for JDK 11,
run
is instrumented with the following command line arguments:As you can see, we have
build\classes\merged
which shouldn't be there according to the spec from #101. However,:pl.tlinkowski.unij.sample.enduser.jdk11:mergeClasses
task was not run (and was not present, which I confirmed in the debugger).Conclusions
Because we:
mergeClasses
tasksbuild/classes/merged
on the module pathit seems to me that the two calls to
isMergeRequired
return different results:returns
false
:gradle-modules-plugin/src/main/java/org/javamodularity/moduleplugin/tasks/MergeClassesTask.java
Lines 19 to 22 in 29d5d8d
returns
true
:gradle-modules-plugin/src/main/java/org/javamodularity/moduleplugin/tasks/MergeClassesHelper.java
Lines 65 to 68 in 5e49c01
I haven't yet confirmed if they really do return different results, and - if so - why it happens.
The text was updated successfully, but these errors were encountered: