How can I rename the published artifacts of a kotl...
# multiplatform
j
How can I rename the published artifacts of a kotlin multiplatform library? i.e. I want to rename from:
implementation("org.nexa:libnexakotlin:0.0.1")
to
implementation("org.nexa:libnexa-kotlin:0.0.1")
I’m afraid that I have to rename the gradle module of the library, which would cause a huge diff and a massive refactor and I want to avoid that The library is complex and has several targets: mac, ios, jvm and android The library is open source: https://gitlab.com/nexa/libnexakotlin
e
in
settings.gradle.kts
,
Copy code
include(":libnexa-kotlin")
project(":libnexa-kotlin").projectDir = file("libnexakotlin")
will let you use the same directory with a different module name
but honestly I think you should just rename it properly
a
if you just
git mv
the files then the Git diff will be minimal (IntelliJ renaming automatically uses
git mv
under the hood)
as far as coordinates go, technically you can publish relocation info, but I don't think they're well supported https://docs.gradle.org/8.8/userguide/publishing_maven.html#publishing_maven:relocation