Skip to content

Gradle build failed after upgrade to KSP 2.X #2726

@aboutZZ

Description

@aboutZZ

Kotlin version: 2.1.20
KSP version: 2.1.20-1.0.32
Build successful.

I try to upgrade my project kotlin and KSP
Kotlin version: 2.2.21
KSP version: 2.3.3
Build failed.

I tried clean gradle home (delete build cache, dependency dir) restart gradle, but problem still exists.
Seems that error was missing class org.jetbrains.kotlin.incremental.classpathDiff.ClasspathEntrySnapshotter$Settings
Error log:

Unable to load class 'org.jetbrains.kotlin.incremental.classpathDiff.ClasspathEntrySnapshotter$Settings'
org.jetbrains.kotlin.incremental.classpathDiff.ClasspathEntrySnapshotter$Settings

Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)

Re-download dependencies and sync project (requires network)
The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.

Stop Gradle build processes (requires restart)
Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.

In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GradleIssues with KSP Gradle Plugin, AGP or Gradle.incrementalIssues around incremental processing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions