KMM ошибки при сборке android приложения
build.gardle.kts:shared:
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.androidLibrary)
}
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
kotlin {
targetHierarchy.default()
androidTarget {
compilations.all {
kotlinOptions {
jvmTarget = "1.8"
}
}
}
listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64()
).forEach {
it.binaries.framework {
baseName = "shared"
}
}
val ktorVersion = "1.5.0"
val coroutinesVersion = "1.4.2-native-mt"
val serializationVersion = "1.0.1"
val sqlDelightVersion = "1.4.4"
sourceSets {
val commonMain by getting {
dependencies {
api("org.jetbrains.kotlinx:kotlinx-serialization-core:${serializationVersion}")
// HTTP
implementation("io.ktor:ktor-client-core:${ktorVersion}")
implementation("io.ktor:ktor-client-json:${ktorVersion}")
implementation("io.ktor:ktor-client-serialization:${ktorVersion}")
implementation("io.ktor:ktor-client-logging:${ktorVersion}")
// Coroutines
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:${coroutinesVersion}")
implementation("com.squareup.sqldelight:coroutines-extensions:${sqlDelightVersion}")
// DI
implementation("org.kodein.di:kodein-di:7.1.0")
}
}
val commonTest by getting {
dependencies {
implementation(libs.kotlin.test)
implementation(kotlin("test-annotations-common"))
}
}
val androidMain by getting {
dependencies {
implementation("com.google.android.material:material:1.10.0")
}
}
}
}
android {
namespace = "com.example.sciencehub"
compileSdk = 34
defaultConfig {
minSdk = 27
}
}
Я получаю ошибки:
failed Download info Kotlin Multiplatform <-> Android Gradle Plugin compatibility issue: The applied Android Gradle Plugin version (8.3.0-alpha11) is higher than the maximum known to the Kotlin Gradle Plugin. Tooling stability in such configuration isn't tested, please report encountered issues to https://kotl.in/issue The dependency com.squareup.sqldelight:coroutines-extensions:1.4.4 was published in the legacy mode. Support for such dependencies will be removed in the future. See https://kotl.in/0b5kn8 for details.
:shared:transformNativeMainCInteropDependenciesMetadataForIde :shared:transformAppleMainCInteropDependenciesMetadataForIde :shared:transformIosMainCInteropDependenciesMetadataForIde :shared:transformNativeTestCInteropDependenciesMetadataForIde :shared:transformAppleTestCInteropDependenciesMetadataForIde :shared:transformIosTestCInteropDependenciesMetadataForIde :prepareKotlinBuildScriptModel
org.gradle.api.internal.tasks.properties.PropertyEvaluationException: Error while evaluating property 'chooseVisibleSourceSetsProjection' of task ':shared:transformNativeMainCInteropDependenciesMetadataForIde'. java.lang.IllegalStateException: Artifacts of dependency org.jetbrains.kotlinx:kotlinx-serialization-core:1.0.1 is built by old Kotlin Gradle Plugin and can't be consumed in this way org.gradle.api.internal.tasks.properties.PropertyEvaluationException: Error while evaluating property 'chooseVisibleSourceSetsProjection' of task ':shared:transformAppleMainCInteropDependenciesMetadataForIde'. java.lang.IllegalStateException: Artifacts of dependency org.jetbrains.kotlinx:kotlinx-serialization-core:1.0.1 is built by old Kotlin Gradle Plugin and can't be consumed in this way org.gradle.api.internal.tasks.properties.PropertyEvaluationException: Error while evaluating property 'chooseVisibleSourceSetsProjection' of task ':shared:transformIosMainCInteropDependenciesMetadataForIde'. java.lang.IllegalStateException: Artifacts of dependency org.jetbrains.kotlinx:kotlinx-serialization-core:1.0.1 is built by old Kotlin Gradle Plugin and can't be consumed in this way org.gradle.api.internal.tasks.properties.PropertyEvaluationException: Error while evaluating property 'chooseVisibleSourceSetsProjection' of task ':shared:transformNativeTestCInteropDependenciesMetadataForIde'. java.lang.IllegalStateException: Artifacts of dependency org.jetbrains.kotlinx:kotlinx-serialization-core:1.0.1 is built by old Kotlin Gradle Plugin and can't be consumed in this way org.gradle.api.internal.tasks.properties.PropertyEvaluationException: Error while evaluating property 'chooseVisibleSourceSetsProjection' of task ':shared:transformAppleTestCInteropDependenciesMetadataForIde'. java.lang.IllegalStateException: Artifacts of dependency org.jetbrains.kotlinx:kotlinx-serialization-core:1.0.1 is built by old Kotlin Gradle Plugin and can't be consumed in this way org.gradle.api.internal.tasks.properties.PropertyEvaluationException: Error while evaluating property 'chooseVisibleSourceSetsProjection' of task ':shared:transformIosTestCInteropDependenciesMetadataForIde'. java.lang.IllegalStateException: Artifacts of dependency org.jetbrains.kotlinx:kotlinx-serialization-core:1.0.1 is built by old Kotlin Gradle Plugin and can't be consumed in this way The dependency org.kodein.di:kodein-di:7.1.0 was published in the legacy mode. Support for such dependencies will be removed in the future. See https://kotl.in/0b5kn8 for details.
Artifacts of dependency org.jetbrains.kotlinx:kotlinx-serialization-core:1.0.1 is built by old Kotlin Gradle Plugin and can't be consumed in this way