Mostly the same way as for Java.
This guide also can be useful for you
https://guides.gradle.org/building-kotlin-jvm-libraries/
There is guide for local repo publishing, but it’s similar for remote. You also should read guide how to register account on maven central, it’s not easy (much easier to do that on jcenter)