Open mschorsch opened 8 months ago
/cc @geoand (kotlin), @glefloch, @quarkusio/devtools
Today we had a similar issue with the task compileJava
and compileQuarkusGeneratedSourcesJava
. So it seems not Kotlin specific. In all cases the error is that the order of the tasks ist not defined and this can lead to incorrect results.
I assume that the order of compileQuarkusGeneratedSourcesJava
and Kotlin and Java compilation should be explicitly defined in the Gradle Plugin.
Seems to be a problem with the local installation therefore closed.
After further investigation it is not a problem with the local installation.
The problem only occurs when org.gradle.parallel=true
is set in the gradle.properties
file.
@geoand @glefloch @quarkusio/devtools
I've managed to create a small reproducer.
Intellij
Build > Rebuild Project
in Intellij
The following requirements must be met for the error to occur:
org.gradle.parallel=true
must be set in the gradle.properties
fileOnce again, the error only seems to occur in Intellij
itself. However, it may still be a sequence problem with the Gradle tasks, which for whatever reason only occurs in Intellij
.
@aloubyansky: You have been mentioned in other issues in connection with Gradle and the Quarkus plugin so I hope you can help here.
Experiencing a similar problem, meeting the requirements listed by @mschorsch
Following workaround seemed to work for me
tasks.withType<KotlinCompile> {
mustRunAfter("quarkusGenerateCode", "quarkusGenerateCodeDev")
}
I experienced something similar and it seems to be on the IntelliJ side. Note that my multi module gradle projects do not have org.gradle.parallel=true
set.
What fixed it for me is deleting .gradle
/ .idea
folders and reimporting the project. It's almost like Build / Rebuild project generated the wrong set/order of gradle tasks.
I have seen the same issue when building in Visual Studio Code. But don't know what triggered the behavior.
Also #34430 reports the same issue.
Describe the bug
We use
Quarkus
,Kotlin
andGradle
in our various projects.In
multi-module projects
we get the following error inIntellij
:The error only occurs when compiling with the Intellij integrated function
Rebuild Project
. Compiling with./gradlew build
works without problems.We were able to determine the following prerequisites for the error to occur in Intellij:
To workaround the problem we use:
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
So far I have not managed to create a small reproducer.
Output of
uname -a
orver
Linux
Output of
java -version
Java 17
Quarkus version or git rev
Quarkus 3.7.4
Build tool (ie. output of
mvnw --version
orgradlew --version
)Gradle
Additional information
No response