Skip to content

Commit 3bfc117

Browse files
committed
fix: customizeLoggingProperties failing on Windows and macOS
1 parent fd045f7 commit 3bfc117

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

build.gradle.kts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -690,8 +690,18 @@ tasks.register<Exec>("jpackage") {
690690
}
691691

692692
tasks.register("customizeLoggingProperties") {
693-
val loggingPropertiesFile =
694-
tmpDir.get().file("${project.name}/lib/runtime/conf/logging.properties")
693+
val confDir =
694+
tmpDir
695+
.get()
696+
.dir(
697+
when {
698+
os.isWindows -> "${project.name}/runtime/conf"
699+
os.isMacOsX -> "${project.name}.app/Contents/runtime/Contents/Home/conf"
700+
os.isLinux -> "${project.name}/lib/runtime/conf"
701+
else -> throw GradleException("Unsupported operating system ${os.displayName}")
702+
}
703+
)
704+
val loggingPropertiesFile = confDir.file("logging.properties")
695705
description =
696706
"Customizes the '${file(loggingPropertiesFile).relativeTo(projectDir)}' Java runtime configuration file"
697707

@@ -735,7 +745,7 @@ tasks.named<Tar>("distTar") {
735745
}
736746

737747
tasks.named<Zip>("distZip") {
738-
dependsOn("jpackage")
748+
dependsOn("customizeLoggingProperties")
739749

740750
from(tmpDir)
741751
include("${project.name}${if (os.isMacOsX) ".app" else ""}/**")

0 commit comments

Comments
 (0)