I encounter a problem after I publish my KMP library into nexus.
In my KMP library:
plugins {
kotlin("multiplatform") version "1.6.10"
id("maven-publish")
}
publishing {
publications.withType(MavenPublication::class) {
pom {
name.set("Kotlin Multiplatform BigDecimal")
description.set("Kotlin Multiplatform BigDecimal library")
}
}
repositories {
maven {
...
}
}
}
Then I run
./gradlew publishAllPublicationsToNexusSnapshotRepository
I checked my nexus and all targets library were uploaded.
Then in another KMP project, add the dependency
sourceSets {
val commonMain by getting {
dependencies {
implementation("com.calculation.multiplatform:MultiplatformBigDecimal:1.0.0-SNAPSHOT")
}
}
}
After synced project, I cannot build the project in any target.
Unresolved reference: multiplatform
I guess that there is no need to import every target library with gradle module metadata feature, but I don't know why it doesn't work.