touchlab/SKIE

Unable to load class 'co.touchlab.skie.plugin.shim.ActualKgpShim'

Closed this issue · 8 comments

What is the problem?

Compilation fails with:
Unable to load class 'co.touchlab.skie.plugin.shim.ActualKgpShim'
co.touchlab.skie.plugin.shim.ActualKgpShim

When does the problem occur?

During Gradle configuration phase while syncing the project

What versions of SKIE, Kotlin, and Gradle do you use?

  • SKIE: 0.7.1-preview.2.0.0-RC3
  • Kotlin: 2.0.0-RC3

Stacktrace: see SkieReportStacktrace.txt

Hi @bwalter089, I wasn't able to reproduce the issue. What Gradle version are you on? Would you be able to create a small reproducer project?

Thanks @TadeasKriz, I am using gradle v4.6. I will try different combinations and provide more feedback. And of course will try to isolate the issue (the project is large...).

Could you try with Gradle 8.7? I think we don't support 4.6.

The issue remains the same with 4.7 (we use 4.6 because we are considering using Amper which does not support 4.7 yet, at least according to to https://github.com/JetBrains/amper/blob/release/0.3/CHANGELOG.md). I will experiment more and provide a more detailed feedback as soon as possible.

Do you mean 8.6?

In any case, I've been playing around with the 0.7.1-preview.2.0.0-RC3 and it seems like it's another case of Gradle Plugin Portal's terrible caching: https://skie.touchlab.co/known-issues/gradle-cache

You should be able to get around the issue by adding mavenCentral() to pluginManagement.repositories in your settings.gradle.kts and making sure it's above gradlePluginPortal(). For example:

pluginManagement {
    repositories {
        mavenCentral()
        gradlePluginPortal()
        google()
    }
}

Awesome, it fixed the issue (./gradlew <myTask> --refresh-dependencies was needed instead of ./gradlew dependencies --refresh-dependencies). Thanks a lot! Hopefully you will find a solution for the caching issue with the Gradle team :)

Good to know that worked!

We couldn't find a real solution, so instead we plan to make SKIE Gradle plugin a fat jar, so there will be no dependencies that it could cache wrong.