Skip to content

Configure Gradle publishing to GitHub Packages#2

Draft
Copilot wants to merge 2 commits intofeature/unifyfrom
copilot/setup-maven-publishing-again
Draft

Configure Gradle publishing to GitHub Packages#2
Copilot wants to merge 2 commits intofeature/unifyfrom
copilot/setup-maven-publishing-again

Conversation

Copy link
Contributor

Copilot AI commented Nov 12, 2025

Adds GitHub Packages as a Maven publishing target for distributing imcjava artifacts.

Changes

build.gradle

  • Configured GitHub Packages Maven repository with credential support via environment variables (GITHUB_ACTOR, GITHUB_TOKEN) or gradle properties (gpr.user, gpr.key)
  • Added explicit Maven publication metadata (groupId, artifactId, version)
  • Retained existing local file system publishing for backward compatibility

README.md

  • Documented publishing workflow for GitHub Packages
  • Added consumer configuration example showing repository and credential setup

Publishing

export GITHUB_ACTOR=username
export GITHUB_TOKEN=token
./gradlew publish

Consuming

repositories {
    maven {
        url = uri("https://maven.pkg.github.com/oceanscan/imcjava")
        credentials {
            username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_ACTOR")
            password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
        }
    }
}

dependencies {
    implementation 'pt.lsts:imcjava:5.5.5-unify'
}
Original prompt

Setup maven publishing using github repository.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: zepinto <1562009+zepinto@users.noreply.github.com>
Copilot AI changed the title [WIP] Setup Maven publishing using GitHub repository Configure Gradle publishing to GitHub Packages Nov 12, 2025
Copilot AI requested a review from zepinto November 12, 2025 09:45
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