Nexus upload (Kotlin dsl)

I am looking for a plugin and/or a detailed tutorial how I could upload an artifact to Nexus.

I tried a few plugins out there (most of them has no description, the ones having info on usage, I couldn’t manage to work.

I’ve already published artifacts earlier to the Nexus, but that was 3 years ago, using Java and my gradle written in Groovy. My new artifacts should go under the same groupId, but using Kotlin DSL. So I have all the input (user, password, groupId, urls) for Nexus, but simply can’t make it run.

I could provide some code, but I have so many versions of the build script (all failing) that it is now a mess.

Thanks for the help!