Thread
#multiplatform
    Ran

    Ran

    4 months ago
    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.
    Javier

    Javier

    4 months ago
    I can't find that library in
    <https://oss.sonatype.org/content/repositories/snapshots/com/calculation/>
    is it open source?
    Ran

    Ran

    4 months ago
    No, it's in my private nexus
    Not in public maven
    What do you want to check? I can provide the information to you. @Javier
    I solved this problem. Change the snapshot version to release version