Skip to content

Conversation

@brfrn169
Copy link
Collaborator

@brfrn169 brfrn169 commented Jun 6, 2025

Description

This PR fixes the Gradle configuration in the data-loader module to resolve the release failure.

Related issues and/or PRs

N/A

Changes made

Added some inline comments. Please take a look for the details.

Checklist

The following is a best-effort checklist. If any items in this checklist are not applicable to this PR or are dependent on other, unmerged PRs, please still mark the checkboxes after you have read and understood each item.

  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation to reflect the changes.
  • I have considered whether similar issues could occur in other products, components, or modules if this PR is for bug fixes.
  • Any remaining open issues linked to this PR are documented and up-to-date (Jira, GitHub, etc.).
  • Tests (unit, integration, etc.) have been added for the changes.
  • My changes generate no new warnings.
  • Any dependent changes in other PRs have been merged and published.

Additional notes (optional)

N/A

Release notes

N/A

@brfrn169 brfrn169 self-assigned this Jun 6, 2025
@brfrn169 brfrn169 added the bugfix label Jun 6, 2025
@brfrn169 brfrn169 requested a review from Copilot June 6, 2025 09:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Updates Gradle configuration in the data-loader module to resolve naming conflicts and adopt the newer base.archivesName DSL.

  • Adds a project renaming workaround in settings.gradle to avoid duplicate-name conflicts.
  • Replaces deprecated archivesBaseName assignments with the base { archivesName } block in both core and CLI submodules.
  • Adjusts the CLI module’s project dependency path and removes an unused root module reference.
  • Removes a redundant group declaration from the parent data-loader build.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
settings.gradle Workaround to rename :data-loader:core project to data-loader-core to avoid naming conflicts.
data-loader/core/build.gradle Switched from archivesBaseName to base.archivesName; removed conditional shadowJar disabling block.
data-loader/cli/build.gradle Switched from archivesBaseName to base.archivesName; updated project dependency to :data-loader:data-loader-core and removed the old :core reference.
data-loader/build.gradle Removed the top‐level group declaration for subprojects.
Comments suppressed due to low confidence (3)

data-loader/cli/build.gradle:17

  • The dependency on project(':core') now seems incorrect after renaming the core module. Consider removing it or updating it to the correct path to avoid pulling in the wrong module.
implementation project(':core')

data-loader/core/build.gradle:49

  • [nitpick] The conditional disabling of shadowJar was removed, which may lead to fat jars being published unintentionally. Consider documenting this behavior change or restoring the condition if standard JAR publication is still required.
if (project.gradle.startParameter.taskNames.any { it.endsWith('publish') } ||

data-loader/build.gradle:4

  • Removing the group setting will change Maven coordinates for all subprojects, which can break downstream consumers. Verify compatibility or document this as a breaking change.
group = "scalardb.dataloader"

ext {
jacksonVersion = '2.17.0'
}
group = "scalardb.dataloader"
Copy link
Collaborator Author

@brfrn169 brfrn169 Jun 6, 2025

Choose a reason for hiding this comment

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

Deleted this to avoid overriding the scalardb group name. This is the root cause of the release failure.

Comment on lines +8 to +10
// This is a workaround for an issue where projects with the same name lead to unintended conflict.
// See https://github.com/gradle/gradle/issues/847 for the details
findProject(':data-loader:core')?.name = 'data-loader-core'
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added this to avoid the name conflicting issue.

Comment on lines -48 to -53
if (project.gradle.startParameter.taskNames.any { it.endsWith('publish') } ||
project.gradle.startParameter.taskNames.any { it.endsWith('publishToMavenLocal') }) {
// not to publish the fat jar to maven central
shadowJar.enabled = false
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is unnecessary. I missed it during the review of the previous PR.

Copy link
Contributor

@komamitsu komamitsu left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@brfrn169 brfrn169 force-pushed the fix-gradle-configs-in-data-loader branch from 1df2fd8 to bea87ec Compare June 6, 2025 10:05
Copy link
Contributor

@ypeckstadt ypeckstadt left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you.

@ypeckstadt ypeckstadt merged commit 70c1ff2 into master Jun 7, 2025
56 checks passed
@ypeckstadt
Copy link
Contributor

Merged and working now.

@brfrn169 brfrn169 deleted the fix-gradle-configs-in-data-loader branch June 9, 2025 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants