Just braindumping in case anyone wants to add anyt...
# kotest-contributors
e
Just braindumping in case anyone wants to add anything to the process so far. I'm trying out nmcp to publish ks3. This is what the changes look like so far. Gotta use JDK17+ to build, haven't figured out if I have to target jdk17+ as well or if it's just the build that need it. https://github.com/vanniktech/gradle-maven-publish-plugin is another contender for publishing, supposedly a bit higher-level API but not sure how well it deals with multi-module, multi-platform publishing.. but`nmcp` feels good so far, nice control, explicit aggregation, project isolation fully supported..
o
vanniktech/gradle-maven-publish-plugin worked well for me with multi-module, multiplatform publishing. You can search for "vanniktech" inside https://github.com/infix-de/testBalloon to get an idea.
e
Will have a look. This is how it ended up looking using nmcp: https://github.com/kotest/kotest/pull/4915
Do you get one publishing task per module? Or does vanniktech somehow generate a singular publish task which all the submodules are added into automatically?
o
I get one publishing task per module, but (as you can see in the CI config), I can use the task name at the project level, which will invoke all module tasks (usual Gradle behavior).
If I understand correctly, nmcp needs a configured publication, while vanniktech's main function is to create that publication from Gradle language plugins it finds in the modules. So there is not much additional configuration required with vanniktech.
s
I heard people recommend vanniktech too
there's also jreleaser https://jreleaser.org/
o
IIRC, vanniktech is mentioned somewhere in the Kotlin docs. Also, regarding good Gradle configuration I found Oleg's https://github.com/whyoleg/cryptography-kotlin project well structured and up-to-date (which seems difficult to find these days given Gradle's myriad ways to do the same thing).
s
The only way to be really good at gradle is to work on it as your day job like @Adam S does ๐Ÿ™‚
๐Ÿ˜† 1
๐Ÿ‘ 1
a
there's an official KMP example project that uses com.vanniktech.maven.publish https://github.com/Kotlin/multiplatform-library-template
personally I haven't published anything since the new portal came online, but I like the look of nmcp because it's less opinionated
o
I haven't used nmcp so far, but Martin certainly knows his stuff. I'm a happy camper with his work on Java/Kotlin compatibility settings in https://github.com/GradleUp/compat-patrouille.
e
I vote for just merging the nmcp stuff for now. ๐Ÿ™‚ And if Adam prefers it, I wouldn't mind sticking with it. The infrastructure for creating publications etc has been in place a long time and doesn't really change much..
๐Ÿ‘๐Ÿป 1
I just set up secrets, so if you feel like cutting a new milestone release we could give the publishing a go
Just realized I missed some required changes in workflow files.. And I need to figure out how to only build and publish appropriate KMP targets per run.. In Ks3 the build-logic ensures that only desired targets exist per run, so it wasn't an issue there..
s
We can test it by just kicking off a build on master to make sure the snapshots go out? I'm working on a medium sized PR at the moment that we can do a milestone release after.
e
Added a commit that hopefully makes the snapshot workflow work fine. I've enabled SNAPSHOTs in central for kotest as well
s
great
e
https://github.com/kotest/kotest/pull/4918 hugely appreciated if you have a chance to look it through @Adam S ๐Ÿ™‚
Some interactions with the devPublish plugin to figure out..:)
a
Not sure if this is still true on new maven central, perhaps parallel uploads are now supported?
agreed, worth investigating in a later PR
I didn't check it out and run it, but from skimming through it looks good!