⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@tonihele
Copy link
Contributor

@tonihele tonihele commented Jan 8, 2026

Ok, this is a small thing. But locally, if you just do Gradle buildSdk, it tries to get the version from GIT tags. Well, seems it hasn't worked for awhile (or just broken recently with all the Gradle upgrades?). It gives a nasty warning while building. Release build always gives the tag so no problem there.

Copilot AI review requested due to automatic review settings January 8, 2026 16:06
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 version tag retrieval from Git when building locally without explicitly providing a tag parameter. The issue was that the gradle-git library API had changed or was being used incorrectly, causing warnings during local builds.

Key Changes:

  • Upgrades gradle-git dependency from version 1.2.0 to 1.6.0
  • Adds null-safe access to the tag name property with a fallback to "no-tag"

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

version.gradle Outdated
jmeGitTag = project.getProperty("tag_name")
} else {
jmeGitTag = grgit.tag.list().find { it.commit == head }
jmeGitTag = grgit.tag.list().find { it.commit == head }?.name ?: "no-tag"
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

Using "no-tag" as the default value will cause getReleaseInfo() to print warning messages about an erroneous tag since it doesn't match the expected version format. Consider using an empty string "" or null instead, which getReleaseInfo() explicitly handles at lines 60-63 by returning null without warnings.

Suggested change
jmeGitTag = grgit.tag.list().find { it.commit == head }?.name ?: "no-tag"
jmeGitTag = grgit.tag.list().find { it.commit == head }?.name ?: ""

Copilot uses AI. Check for mistakes.
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

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


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

@tonihele tonihele merged commit 3607da8 into jMonkeyEngine:master Jan 8, 2026
9 checks passed
@tonihele tonihele deleted the bugfix/version-tag-git branch January 8, 2026 21:09
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.

1 participant