Avoid duplicate JAR names

This commit is contained in:
cketti 2023-05-25 15:03:11 +02:00
parent f78efbdd97
commit a40a53c7f1

View file

@ -1,3 +1,5 @@
import org.gradle.jvm.tasks.Jar
plugins {
`java-library`
id("org.jetbrains.kotlin.jvm")
@ -8,6 +10,13 @@ java {
targetCompatibility = ThunderbirdProjectConfig.javaCompatibilityVersion
}
tasks.withType<Jar> {
// We want to avoid ending up with multiple JARs having the same name, e.g. "common.jar".
// To do this, we use the modified project path as base name, e.g. ":core:common" -> "core.common".
val projectDotPath = project.path.split(":").filter { it.isNotEmpty() }.joinToString(separator = ".")
archiveBaseName.set(projectDotPath)
}
configureKotlinJavaCompatibility()
dependencies {