Skip to content

Conversation

@komamitsu
Copy link
Owner

No description provided.

@gemini-code-assist
Copy link

Summary of Changes

Hello @komamitsu, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses an issue with JReleaser's staging directory configuration by ensuring that all references to the staging-deploy path are correctly resolved relative to the root project. This change prevents potential build or deployment failures that could arise from incorrect staging directory resolution, leading to a more robust and reliable release process.

Highlights

  • JReleaser Staging Directory Fix: Corrected the path resolution for the staging-deploy directory within the build.gradle.kts file to ensure it is consistently referenced from the root project.
  • Maven Repository Configuration: Updated the url for the 'staging' Maven repository to explicitly use rootProject.layout.buildDirectory for accurate pathing.
  • Sonatype Publisher Configuration: Modified the stagingRepositories setting for the JReleaser Sonatype publisher to also leverage rootProject.layout.buildDirectory.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/release.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request addresses an issue with JReleaser's staging directory configuration in a multi-project build. The changes correctly unify the staging directory to the root project's build directory for all subprojects, ensuring a single location for staged artifacts. This is a good fix. I've added one suggestion to improve the Gradle script's robustness by using lazy providers for path construction, which is a best practice.

url = "https://central.sonatype.com/api/v1/publisher"
applyMavenCentralRules = true
stagingRepositories.set(listOf("${layout.buildDirectory.get().asFile}/staging-deploy"))
stagingRepositories.set(listOf("${rootProject.layout.buildDirectory.get().asFile}/staging-deploy"))

Choose a reason for hiding this comment

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

medium

While this change correctly points to the root project's build directory, the path construction can be improved to be more robust and idiomatic for Gradle. Using string interpolation with a hardcoded path separator (/) can be brittle on different operating systems. Additionally, using .get() causes eager resolution of the property, which is discouraged in favor of Gradle's lazy configuration model.

A better approach is to use Gradle's Provider API to construct the path lazily and in a platform-independent way.

        stagingRepositories.set(rootProject.layout.buildDirectory.dir("staging-deploy").map { setOf(it.asFile.path) })

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

This PR fixes the JReleaser staging directory configuration in a multi-module Gradle project to ensure all subprojects publish their artifacts to a unified staging location in the root project's build directory, rather than each subproject using its own build directory.

Key Changes:

  • Updated Maven repository and JReleaser configuration to use rootProject.layout.buildDirectory instead of layout.buildDirectory
  • Modified the release workflow to explicitly publish artifacts to the staging repository before running JReleaser

Reviewed changes

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

File Description
build.gradle.kts Updated the staging Maven repository URL and JReleaser's stagingRepositories configuration to reference the root project's build directory, ensuring all subprojects stage artifacts in the same location
.github/workflows/release.yml Added publishAllPublicationsToStagingRepository task to the release workflow to ensure artifacts are published to the staging directory before JReleaser processes them

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@komamitsu komamitsu merged commit deba94c into master Jan 4, 2026
18 checks passed
@komamitsu komamitsu deleted the fix-jreleaser-staging-dir branch January 4, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants