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

Nikky

08/09/2020, 5:44 PM
i am looking for tutorials about how to do bintray publishing of multiplatform projects.. my library only depends on the serialization-runtime and reflect and i plan to public to desktop platforms and jvm for now can anyone point me to a minimalistic example ? ideally using gradle-kts, but i can translate groovy if needed
m

Marc Knaup

08/09/2020, 5:48 PM
I don’t have a minimalistic example but you can steal from my Gradle plugin if you like. It unifies configuration (including Bintray publishing) of all my libraries. https://github.com/fluidsonic/fluid-gradle/blob/c56c02a0018e3c1a5dda644d825dfb03326bf095/sources/LibraryModuleConfigurator.kt#L418
d

Dominaezzz

08/09/2020, 6:18 PM
n

Nikky

08/09/2020, 6:52 PM
thanks for the help, i am currently trying to adapt the scripts from matrix-kt since they seem to be the shortest and easiest to understand
@Dominaezzz any reason why you did not use the bintray plugin? i assume it gets in the way with mpp ?
d

Dominaezzz

08/09/2020, 6:55 PM
The bintray plugin doesn't support gradle metadata out of the box. It needs to be hacked to get it working. The Jetbrains team abandoned it, so I followed suit.
n

Nikky

08/09/2020, 6:56 PM
i see, makes sense, thats why all the other approaches seemed so over the top i guess
thanks, this mostly worked.. now i am jsut running into the issue of the compiler throwing a NPE .. but i was going to run into that either way
d

Dominaezzz

08/09/2020, 7:20 PM
Glad I could help... mostly 😄.
n

natario1

08/11/2020, 9:04 AM
If you want a less verbose solution: https://github.com/natario1/MavenPublisher you can just add multiple bintray { } blocks, one per bintray repo. Example: https://github.com/natario1/Egloo/blob/master/library/build.gradle.kts#L97-L117