https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
d

Dragos Rachieru

01/05/2021, 11:12 AM
Hello, I am having a hard time publishing my multiplatform library to Sonatype. My build.gradle file is this: https://github.com/dragossusi/sevens-payload/blob/master/payload/build.gradle.kts I somehow made it work, but it creates 2 repositories at the same time, 1 fails everytime.
g

georg

01/05/2021, 11:18 AM
I had a similar problem with my Gradle plugin. Unfortunately, I can’t remember how I solved it 😕However, perhaps it helps to compare the two build files, adjust the differences and test if it starts working https://github.com/ge-org/multiplatform-swiftpackage/blob/master/build.gradle.kts
d

Dragos Rachieru

01/05/2021, 11:24 AM
looks like you use jvm only
I am able to publish Kotlin/JVM, but I have problems with MPP 😞
a

Animesh Sahu

01/05/2021, 11:55 AM
I don't know much about sonatype, but here's my working approach after "alot" of hit & trials for publishing to jcenter/bintray: https://github.com/Animeshz/keyboard-mouse-kt/blob/0e70744571f73ef5f5b1b3a274fea04db1572956/build.gradle.kts#L20-L72
By the way kotlin-multiplatform plugin automatically generates the sources jar for non-jvm targets automatically, so you don't need to specify your own.
j

Javier

01/05/2021, 12:06 PM
I moved to another plugin which uses maven-publish under the hood because some times I get multiple repositories
d

Dragos Rachieru

01/05/2021, 12:09 PM
I think I managed to make it work
👍 1
2 Views