What methods of publishing does the team recommend...
# klibs-io
m
What methods of publishing does the team recommend? I tried
anniktech/gradle-maven-publish-plugin
but since upgrading to Kotlin 2.X (I believe?) my artifacts are failing to validate. Is there a different recommended plugin?
d
Hey @martmists! I hope standard
maven-publish
plugin will help. Also, check an article about publication on kotlinlang.org
m
maven-publish doesn't sign the artifacts unfortunately, so mavencentral rejects them.
d
Have you tried to combine it with the signing plugin ?
m
I didn't see a way to only make that one sign artifacts for mavencentral and leave the publishing for other repositories as-is.
d
Hey @Adam Semenenko, could you assist here?
I do see an issue that says signing doesn't seem to work as expected https://github.com/vanniktech/gradle-maven-publish-plugin/issues/917 I haven't used the Vanniktech plugin, so I'm not sure whether something could be misconfigured, or whether it supports conditional signing.
There are some examples on Gradle about how to configure conditional signing https://docs.gradle.org/8.14/userguide/signing_plugin.html#sec:conditional_signing
m
> I do see an issue that says signing doesn't seem to work as expected That happens to be my issue 🙂 It used to work fine on previous versions, but bumping up the kotlin version seems to have broken it somehow scratch that, it seems to just have broken out of nowhere looking at commit history. Here's the build.gradle.kts for reference: https://github.com/Martmists-GH/ndarray.simd/blob/master/build.gradle.kts#L344 I'll see if I can get regular signing working, does it automatically apply itself to kotlin multiplatform artifacts or will I have to specify all of them manually?
a
ah I see the similar usernames now!
please could you make an issue? We can take a further look https://kotl.in/issue
Please also ask in #C19FD9681 - maybe someone from the community can help
w
@martmists hey, I'm just looking at the issue and trying to reproduce it, and I was wondering if you had any luck solving it? I have to say the only time when I saw a similar problem with signature validation was when I forgot to upload my public key to a keyserver. After I did that and waited 15-20 minutes, then tried publishing to Maven Central again, everything validated successfully. If you have any additional details or insights since your original report I'd appreciate it if you let me know!
m
It seems to have magically solved itself after a few dozen more commits
w
in that case I wonder if it was a problem on Sonatype's side... thanks for the info!