Avoid duplicate JAR names
This commit is contained in:
parent
f78efbdd97
commit
a40a53c7f1
1 changed files with 9 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue