Quarkus: Quarkus 1.7.x: Gradle Kotlin project compilation error

Created on 26 Aug 2020  路  9Comments  路  Source: quarkusio/quarkus

Describe the bug
After upgrading my Quarkus (gradle, Kotlin) project from 1.6.1.Final to 1.7.0.Final, I get a compilation error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':common:quarkusPrepareTests'.
> Cannot change dependencies of dependency configuration ':common:kotlinCompilerPluginClasspath' after it has been resolved.

To Reproduce
Steps to reproduce the behavior:

  1. Download reproducer project and unzip it 2020-08-25_kotlin-compiling-issues.zip
  2. Run ./gradlew check in the project directory
  3. The build fails with the error shown above
  4. Change the Quarkus version in gradle.properties to 1.6.1.Final and it works

Environment (please complete the following information):

  • Quarkus 1.7.0

    • Windows 10

    • JDK 11

aregradle arekotlin kinbug

All 9 comments

FYI: @glefloch

/cc @evanchooly
/cc @quarkusio/devtools, @glefloch

This error still exists in Quarkus 1.7.1.

Yes, just found a fix, the quarkusPrepare tasks need to be run before any kotlin compilation.
I need to create an integration test and I will open a pull request.
If you don't have grpc code generation, you can just skip quarkusPrepare and quarkusPrepareTest tasks as a workaround.

@glefloch just to make you aware of: https://github.com/quarkusio/quarkus/pull/11624

Thanks @gsmet I will rebase my branch.

@glefloch: Thanks! Sounds great. Looking forward to the fix :)

I've encountered this problem on Kotlin 1.3.72 + Quarkus 1.7.1 when using ./gradlew build -Dquarkus.package.type=native. Using ./gradlew buildNative works fine.
`

Oh I assume we won't get a Quarkus 1.7.2 hotfix release?
We are not able to run JUnit tests anymore.

Was this page helpful?
0 / 5 - 0 ratings