I’m getting `Entry rest/lib/model-jvm.jar is a dup...
# multiplatform
p
I’m getting
Entry rest/lib/model-jvm.jar is a duplicate but no duplicate handling strategy has been set. Please refer to <https://docs.gradle.org/7.5.1/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:duplicatesStrategy> for details.
It’s because I have two Gradle modules that are called
model
, see a related thread for Kotlin/JS. Now there’s the clash also for JVM modules, but I cannot see an equivalent of
moduleName
for
kotlin { jvm { … } }
. Please advise!
found this https://kotlinlang.slack.com/archives/C19FD9681/p1625446772305300 but
project(":domain:model").name = "domain-model"
I have to refer to this project in other modules by
project(":domain:domain-model")
which I don’t like because it’s called differently in the project tree - it’s confusing. I can remember about it, but my coworkers will get confused. I’d like to go the path with customizing JAR name, but not yet sure how to achieve it in the multiplatform config
solved by writing:
Copy code
tasks.getByName<Jar>("jvmJar") {
    // Without this customization, there's a clash with another "model" module.
    archiveBaseName.set("domain-model")
}