Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoClassDefFoundError: org/gradle/internal/extensions/stdlib/CharSequenceExtensionsKt #84

Open
rs-georg opened this issue Jan 9, 2025 · 1 comment

Comments

@rs-georg
Copy link

rs-georg commented Jan 9, 2025

Hi,

I'm in the middle of updating to Kotlin 2.1.0 and MockMP 2.0 respectively.
I am facing the following error when syncing the project with Gradle. Has anyone seen this before? Or any idea what to do?

java.lang.NoClassDefFoundError: org/gradle/internal/extensions/stdlib/CharSequenceExtensionsKt
	at org.kodein.mock.gradle.MocKMPGradlePlugin$Extension.addKspDependencies(MocKMPGradlePlugin.kt:236)
	at org.kodein.mock.gradle.MocKMPGradlePlugin$Extension.onTest(MocKMPGradlePlugin.kt:106)
	at Build_gradle$18.execute(build.gradle.kts:382)
	at Build_gradle$18.execute(build.gradle.kts:381)
	at org.gradle.internal.extensibility.ExtensionsStorage$ExtensionHolder.configure(ExtensionsStorage.java:177)
	at org.gradle.internal.extensibility.ExtensionsStorage.configureExtension(ExtensionsStorage.java:64)
	at org.gradle.internal.extensibility.DefaultConvention.configure(DefaultConvention.java:211)
	at org.gradle.kotlin.dsl.Accessorsba7criy71m7ip80ppbelhxn1nKt.mockmp(Unknown Source)
	at Build_gradle.<init>(build.gradle.kts:381)

I am using these dependencies

  • Kotlin 2.1.0
  • MockMP 2.0.0
  • KSP 2.1.0-1.0.29
  • Gradle 8.6

The MockMP configuration is at the end of the Gradle file, so definitely after the kotlin block

mockmp {
    onTest {
        withHelper()
    }
}
@rs-georg
Copy link
Author

rs-georg commented Jan 9, 2025

UPDATE:
When moving the mockmp block before the kotlin block, the error goes away. However, I then run into #81

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant