Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release-snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
VERSION=$(./gradlew :core:properties -q | grep "version:" | awk '{print $2}')
echo "version=${VERSION}" >> $GITHUB_OUTPUT

- name: Upload SNAPSHOT versions for scalardb, scalardb-schema-loader, and scalardb-integration-test to Maven Snapshot Repository
- name: Upload SNAPSHOT versions for scalardb, scalardb-schema-loader, scalardb-data-loader-core, and scalardb-integration-test to Maven Snapshot Repository
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please make the same change for the follows:

- name: Upload scalardb, scalardb-schema-loader, and scalardb-integration-test to Maven Central Repository

if: contains(steps.version.outputs.version, '-SNAPSHOT')
run: |
echo "${{secrets.SIGNING_SECRET_KEY_RING}}" | base64 -d > ~/.gradle/secring.gpg
Expand Down
67 changes: 67 additions & 0 deletions data-loader/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ plugins {
id 'net.ltgt.errorprone' version "${errorpronePluginVersion}"
id 'com.github.johnrengelman.shadow' version "${shadowPluginVersion}"
id 'com.github.spotbugs' version "${spotbugsPluginVersion}"
id 'maven-publish'
id 'signing'
id 'base'
}

archivesBaseName = "scalardb-data-loader-core"
Expand Down Expand Up @@ -41,3 +44,67 @@ spotbugsTest.reports {
html.enabled = true
}
spotbugsTest.excludeFilter = file("${project.rootDir}/gradle/spotbugs-exclude.xml")

if (project.gradle.startParameter.taskNames.any { it.endsWith('publish') } ||
project.gradle.startParameter.taskNames.any { it.endsWith('publishToMavenLocal') }) {
Comment on lines +48 to +49
Copy link

Copilot AI Jun 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Using broad string matching to detect publish tasks for disabling shadowJar might be fragile; consider checking for explicit task names to avoid unintended side effects.

Suggested change
if (project.gradle.startParameter.taskNames.any { it.endsWith('publish') } ||
project.gradle.startParameter.taskNames.any { it.endsWith('publishToMavenLocal') }) {
if (project.gradle.taskGraph.hasTask(":publish") ||
project.gradle.taskGraph.hasTask(":publishToMavenLocal")) {

Copilot uses AI. Check for mistakes.
// not to publish the fat jar to maven central
shadowJar.enabled = false
}

publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'scalardb-data-loader'
from components.java
pom {
name = 'ScalarDB Data Loader'
description = 'A tool for importing data to and from ScalarDB'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe exporting is necessary? (CC: @ypeckstadt, @josh-wong)

Suggested change
description = 'A tool for importing data to and from ScalarDB'
description = 'A tool for exporting data from and importing data into ScalarDB'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brfrn169 san,
I have updated the description.
Thank you.

url = 'https://github.com/scalar-labs/scalardb'
licenses {
license {
name = 'Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0'
}
}
developers {
developer {
id = 'hiroyuki'
name = 'Hiroyuki Yamada'
email = '[email protected]'
}
developer {
id = 'brfrn169'
name = 'Toshihiro Suzuki'
email = '[email protected]'
}
developer {
id = 'Torch3333'
name = 'Vincent Guilpain'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:https://github.com/scalar-labs/scalardb.git'
developerConnection = 'scm:git:https://github.com/scalar-labs/scalardb.git'
url = 'https://github.com/scalar-labs/scalardb'
}
}
}
}
repositories {
maven {
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = project.properties['ossrhUsername'] ?: ""
password = project.properties['ossrhPassword'] ?: ""
}
}
}
}

signing {
required { project.gradle.taskGraph.hasTask("publish") }
sign publishing.publications.mavenJava
}