nam
06/29/2024, 8:26 AMmacosMain
into KMP project?
Thanks for reading!nam
06/29/2024, 9:22 AMmacosMain
but having an issue with dependency
macosArm64("macos") {
binaries {
executable()
}
}
sourceSets {
val desktopMain by getting
val macosMain by getting {
dependsOn(desktopMain)
}
commonMain.dependencies {
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.material)
implementation(compose.ui)
implementation(compose.components.resources)
implementation(compose.components.uiToolingPreview)
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.0")
}
desktopMain.dependencies {
implementation(compose.desktop.currentOs)
}
}
Error gradle sync:
Could not resolve all artifacts for configuration ':composeApp:macosCompileKlibraries'.
> Could not resolve org.jetbrains.compose.desktop:desktop:1.6.11.
Required by:
project :composeApp > org.jetbrains.compose.desktop:desktop-jvm-macos-arm64:1.6.11
> No matching variant of org.jetbrains.compose.desktop:desktop:1.6.11 was found. The consumer was configured to find a library for use during 'kotlin-api', preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'macos_arm64', attribute 'org.jetbrains.kotlin.platform.type' with value 'native' but:
- Variant 'jvmApiElements-published' declares a library for use during compile-time:
ephemient
06/29/2024, 9:41 AMnam
06/29/2024, 9:54 AMephemient
06/29/2024, 11:29 AMmacosArm64
cannot be a child of desktopMain
because desktop dependencies are not available for itnam
06/29/2024, 2:16 PMnam
06/29/2024, 2:16 PMPablichjenkov
06/29/2024, 9:30 PMephemient
06/29/2024, 9:44 PMephemient
06/29/2024, 9:45 PMnam
07/02/2024, 4:56 AM