From 366e4d3c38ad4b34668b872c523fd0701c026b24 Mon Sep 17 00:00:00 2001 From: Suguru ARAKAWA Date: Sat, 23 Dec 2023 10:27:46 +0900 Subject: [PATCH] build: fix distribution archive name. --- .../groovy/tanzawa.java-conventions.gradle | 5 +++++ modules/tgdump/cli/build.gradle | 20 +++++++++---------- modules/tgsql/cli/build.gradle | 20 +++++++++---------- 3 files changed, 25 insertions(+), 20 deletions(-) diff --git a/buildSrc/src/main/groovy/tanzawa.java-conventions.gradle b/buildSrc/src/main/groovy/tanzawa.java-conventions.gradle index c50ec1b..8aa5772 100644 --- a/buildSrc/src/main/groovy/tanzawa.java-conventions.gradle +++ b/buildSrc/src/main/groovy/tanzawa.java-conventions.gradle @@ -108,3 +108,8 @@ task writeVersion(type: WriteProperties) { sourceSets.main.output.dir("${project.buildDir}/generated/version") processResources.dependsOn writeVersion + +tasks.withType(Tar) { task -> + task.archiveExtension = 'tar.gz' + task.compression = Compression.GZIP +} diff --git a/modules/tgdump/cli/build.gradle b/modules/tgdump/cli/build.gradle index 57b7060..57ee5dc 100644 --- a/modules/tgdump/cli/build.gradle +++ b/modules/tgdump/cli/build.gradle @@ -23,6 +23,16 @@ dependencies { testImplementation 'com.fasterxml.jackson.core:jackson-databind:2.13.3' } +distributions { + main { + distributionBaseName = 'tgdump' + } + shadow { + distributionBaseName = 'tgdump' + distributionClassifier = 'shadow' + } +} + application { applicationName = 'tgdump' mainClass = 'com.tsurugidb.tools.tgdump.cli.Main' @@ -39,16 +49,6 @@ shadowJar { mergeServiceFiles() } -distZip { - archiveFileName = "tgdump.zip" -} - -distTar { - archiveFileName = "tgdump.tar.gz" - archiveExtension = 'tar.gz' - compression = Compression.GZIP -} - test { systemProperty 'org.slf4j.simpleLogger.defaultLogLevel', findProperty('test.logLevel') ?: 'debug' } diff --git a/modules/tgsql/cli/build.gradle b/modules/tgsql/cli/build.gradle index d5edac1..6145440 100644 --- a/modules/tgsql/cli/build.gradle +++ b/modules/tgsql/cli/build.gradle @@ -23,6 +23,16 @@ dependencies { testImplementation 'org.slf4j:slf4j-simple:1.7.36' } +distributions { + main { + distributionBaseName = 'tgsql' + } + shadow { + distributionBaseName = 'tgsql' + distributionClassifier = 'shadow' + } +} + application { applicationName = 'tgsql' mainClass = 'com.tsurugidb.console.cli.Main' @@ -40,13 +50,3 @@ shadowJar { archiveClassifier = 'all' mergeServiceFiles() } - -distZip { - archiveFileName = "tgsql.zip" -} - -distTar { - archiveFileName = "tgsql.tar.gz" - archiveExtension = 'tar.gz' - compression = Compression.GZIP -}