Skip to content

Commit 6f229c6

Browse files
komamitsuclaude
andcommitted
Fix shadow jar being published to GitHub Packages (#3472)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 9b67f9e commit 6f229c6

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

data-loader/cli/build.gradle

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,8 @@ task docker(type: Exec) {
8484
commandLine 'docker', 'build', "--tag=ghcr.io/scalar-labs/scalardb-data-loader-cli:${project.version}", "."
8585
}
8686

87-
// for archiving and uploading to maven central
88-
if (project.gradle.startParameter.taskNames.any { it.endsWith('publish') } ||
89-
project.gradle.startParameter.taskNames.any { it.endsWith('publishToMavenLocal') }) {
90-
// not to publish the fat jar to maven central
87+
// for publishing (not to publish the fat jar)
88+
if (project.gradle.startParameter.taskNames.any { it.tokenize(':').last().startsWith('publish') }) {
9189
shadowJar.enabled = false
9290
}
9391

schema-loader/build.gradle

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,8 @@ spotbugsTest.reports {
9393
}
9494
spotbugsTest.excludeFilter = file("${project.rootDir}/gradle/spotbugs-exclude.xml")
9595

96-
// for archiving and uploading to maven central
97-
if (project.gradle.startParameter.taskNames.any { it.endsWith('publish') } ||
98-
project.gradle.startParameter.taskNames.any { it.endsWith('publishToMavenLocal') }) {
99-
// not to publish the fat jar to maven central
96+
// for publishing (not to publish the fat jar)
97+
if (project.gradle.startParameter.taskNames.any { it.tokenize(':').last().startsWith('publish') }) {
10098
shadowJar.enabled = false
10199
}
102100

0 commit comments

Comments
 (0)