Skip to content

Gradle build with KSP fails with "circular dependency" after Quarkus 2.13.0 #29698

@tanadeau

Description

@tanadeau

Describe the bug

When using KSP (Kotlin Symbol Processing, see https://kotlinlang.org/docs/ksp-overview.html), the Gradle build fails with a "circular dependency" starting with Quarkus 2.13.0 (up to the latest 2.14.2). It worked fine in 2.12.3.

Expected behavior

Build succeeds

Actual behavior

Build fails with circular dependency:

FAILURE: Build failed with an exception.

* What went wrong:
Circular dependency between the following tasks:
:backend:kspKotlin
+--- :backend:quarkusGenerateCode
|    \--- :backend:processResources
|         \--- :backend:kspKotlin (*)
\--- :backend:quarkusGenerateCodeDev
     \--- :backend:processResources (*)

(*) - details omitted (listed previously)

How to Reproduce?

Reproducer: quarkus-reproducer.zip

Steps to reproduce:

  1. ./gradlew clean build (will fail)
  2. In gradle.properties, change quarkusVersion from 2.13.0.Final to 2.12.3.Final.
  3. ./gradlew clean build (will succeed)

If quarkusVersion is greater or equal to 2.13.0.Final, it will fail in the same way, including the latest version (2.14.2.Final).

Output of uname -a or ver

Darwin C02YK01PLVCG-ML 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:17:10 PDT 2022; root:xnu-8020.140.49~2/RELEASE_X86_64 x86_64

Output of java -version

openjdk version "17.0.3" 2022-04-19

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.13.0

Build tool (ie. output of mvnw --version or gradlew --version)

Gradle 7.6

Additional information

This occurs in at least Gradle 7.5.1 and 7.6.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions