Zac Sweers
06/09/2024, 7:54 PMmain
functions from jvmMain
sources in KMP projects? I’ve seen a bunch of past threads referring to both compose.application.desktop.mainClass
and kotlin.jvm.mainRun.mainClass
, but none of them ever seem to actually be resolved or support invocation from the IDE. This seems like a big missing piece for debugging if the only way to run with the necessary application classes bundled is via command line/`./gradlew run`jw
06/09/2024, 8:05 PMZac Sweers
06/09/2024, 8:05 PMwithJava()
is required?jw
06/09/2024, 8:05 PMZac Sweers
06/09/2024, 8:05 PMapplication
plugin?jw
06/09/2024, 8:05 PMjw
06/09/2024, 8:06 PMmain()
though?Zac Sweers
06/09/2024, 8:07 PMjw
06/09/2024, 8:07 PMZac Sweers
06/09/2024, 8:09 PMA problem occurred configuring root project 'field-spottr-root'.
> Cannot add task 'run' as a task with that name already exists.
jw
06/09/2024, 8:09 PMZac Sweers
06/09/2024, 8:10 PMZac Sweers
06/09/2024, 8:10 PMException in thread "main" java.lang.NoClassDefFoundError: androidx/collection/ScatterMapKt
at androidx.compose.runtime.collection.ScopeMap.<init>(ScopeMap.kt:26)
at androidx.compose.runtime.CompositionImpl.<init>(Composition.kt:479)
at androidx.compose.runtime.CompositionImpl.<init>(Composition.kt:434)
at androidx.compose.runtime.CompositionKt.Composition(Composition.kt:335)
at androidx.compose.ui.window.Application_desktopKt$awaitApplication$2$1$2.invokeSuspend(Application.desktop.kt:219)
...
eygraber
06/09/2024, 10:57 PMapplication
plugin. Is that what produces that stacktrace above?eygraber
06/09/2024, 11:00 PMmainClass
(example here), the IDE adds a run configuration for it (but maybe that actually happens when I click the play button; I never actually checked that).Zac Sweers
06/09/2024, 11:22 PMZac Sweers
06/09/2024, 11:22 PMeygraber
06/09/2024, 11:34 PMZac Sweers
06/09/2024, 11:34 PMZac Sweers
06/09/2024, 11:35 PMeygraber
06/09/2024, 11:35 PMjw
06/09/2024, 11:40 PM