Skip to content

Circular Dependency Between KAPT and KSP with AGP 9 and Legacy KAPT #2743

@esafirm

Description

@esafirm

Using the built-in Kotlin and legacy-kapt in AGP 9 emit this error:

* Exception is:
org.gradle.api.CircularReferenceException: Circular dependency between the following tasks:
:midiroll-screen:kaptDebugKotlin
+--- :midiroll-screen:kaptGenerateStubsDebugKotlin
|  \--- :midiroll-screen:kspDebugKotlin
|     \--- :midiroll-screen:kaptDebugKotlin (*)
\--- :midiroll-screen:kspDebugKotlin (*)

(*) - details omitted (listed previously)

Might be related with #1772

Tested Versions

  • 2.2.10-2.0.2 -> No issue
  • 2.3.4 -> Circula ref issue

Here's a reproducer: https://github.com/esafirm/circular-ref-kapt-ksp

Metadata

Metadata

Assignees

No one assigned

    Labels

    GradleIssues with KSP Gradle Plugin, AGP or Gradle.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions