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

Unable to load class 'org.jetbrains.kotlin.gradle.plugin.mpp.PublishingKt' #31

Open
mirzemehdi opened this issue Dec 31, 2024 · 5 comments

Comments

@mirzemehdi
Copy link

This happens with kotlin version is 2.1.0.

Workaround:
downgrading kotlin version to 2.0.21

@CRamsan
Copy link

CRamsan commented Jan 29, 2025

Any plans for adding compatibility with newer versions of Kotlin?

@JSMonk
Copy link
Member

JSMonk commented Jan 30, 2025

@CRamsan sure. I'm going to fix it soon and publish it on Monday.
I'm so sorry for the delay and such an issue.

@CRamsan
Copy link

CRamsan commented Jan 31, 2025

Let me know if I can help with anything. Thanks for your work!

@JSMonk
Copy link
Member

JSMonk commented Feb 7, 2025

@CRamsan @mirzemehdi, We've published the 0.0.2+dev6 version, which works with 2.1.0. Could you please check if the issue is reproducible on your side (I checked it on our exmaple project, and it worked for me)

@CRamsan
Copy link

CRamsan commented Feb 7, 2025

Thanks for the update! I am fairly new to this project so may have missed some configurations or documentations. I gave it a try and here are some things I found:

  • The gradle module now syncs and I was able to run it on the JVM target.
  • For each submodule, I am getting this warning: > Configure project :ui-catalog w: The artifact org.jetbrains.kotlin:kotlin-compiler-embeddableis present in the build classpath along Kotlin Gradle plugin. This may lead to unpredictable and inconsistent behavior. For more details, see: https://kotl.in/gradle/internal-compiler-symbols
    It is only a warning but the project is able to compile and run*.

I am also getting the following errors, but they do not repro in the example project. So my assumption is that there may be other configurations in my project that are causing them. I will leave them here for reference just in case:

  • On the wasm target when I run wasmJsBrowserStoriesDevelopmentRun the page does not render. The issue seems to be the MIME type of the javascript file. This is the error:
    Refused to execute script from 'http://localhost:8080/composeApp.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    Image
  • When I run jvmStoriesRun the catalog window appears but when I click on a story I get this error:
    Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: 'void com.cramsan.ui.components.DropdownKt.Dropdown(java.lang.String, androidx.compose.ui.Modifier, java.util.List, java.util.List, kotlin.jvm.functions.Function1, kotlin.jvm.functions.Function1, androidx.compose.runtime.Composer, int)' at com.cramsan.ui.components.DropdownKt$special$$inlined$story$1.invoke(StoryDelegate.kt:38) at com.cramsan.ui.components.DropdownKt$special$$inlined$story$1.invoke(StoryDelegate.kt:12) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jb.kt:116) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jb.kt:33) at org.jetbrains.compose.storytale.gallery.platform.StoryGallery_desktopKt$GalleryContent$1$1$1$1.invoke(StoryGallery.desktop.kt:123)

As I said, the example project in this repo works fine with your changes. Thanks for all the help!

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

3 participants