Skip to content

Use git CLI for version metadata#2709

Open
8Keep wants to merge 1 commit intojMonkeyEngine:masterfrom
8Keep:git-cli-version-metadata
Open

Use git CLI for version metadata#2709
8Keep wants to merge 1 commit intojMonkeyEngine:masterfrom
8Keep:git-cli-version-metadata

Conversation

@8Keep
Copy link
Copy Markdown
Contributor

@8Keep 8Keep commented Apr 16, 2026

The author of the gradle plugin we use (that uses jgit) has abandoned it, saying it's easy to just use git cli from gradle directly: https://andrewoberstar.com/posts/2024-04-02-dont-commit-to-grgit/

I ran into a broken version info when trying to speed up the gradle builds, because I use git worktrees to get work done, and jgit doesn't seem to support git worktrees. So this enables new AI native functionality: many git worktrees for different workstreams in parallel, too.

Split out from #2701

Copy link
Copy Markdown
Contributor

@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 replaces the grgit library with direct Git command execution using Gradle's providers.exec to retrieve versioning metadata. The changes include removing the gradle-git dependency and refactoring version.gradle to use a new gitOutput helper. A review comment identifies a potential issue where jmeBranchName could be overwritten with an empty string if Git commands fail, suggesting a fallback to the default 'unknown' value.

Comment thread version.gradle Outdated
@8Keep 8Keep force-pushed the git-cli-version-metadata branch from be27733 to 63c4913 Compare April 16, 2026 00:36
@8Keep 8Keep marked this pull request as ready for review April 16, 2026 00:37
@8Keep
Copy link
Copy Markdown
Contributor Author

8Keep commented Apr 16, 2026

Ready for review

@github-actions
Copy link
Copy Markdown

🖼️ Screenshot tests have failed.

The purpose of these tests is to ensure that changes introduced in this PR don't break visual features. They are visual unit tests.

📄 Where to find the report:

⚠️ If you didn't expect to change anything visual:
Fix your changes so the screenshot tests pass.

If you did mean to change things:
Review the replacement images in jme3-screenshot-tests/build/changed-images to make sure they really are improvements and then replace and commit the replacement images at jme3-screenshot-tests/src/test/resources.

If you are creating entirely new tests:
Find the new images in jme3-screenshot-tests/build/changed-images and commit the new images at jme3-screenshot-tests/src/test/resources.

Note; it is very important that the committed reference images are created on the build pipeline, locally created images are not reliable. Similarly tests will fail locally but you can look at the report to check they are "visually similar".

See https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-screenshot-tests/README.md for more information

Contact @richardTingle (aka richtea) for guidance if required

@8Keep
Copy link
Copy Markdown
Contributor Author

8Keep commented Apr 16, 2026

@richardTingle it seems like the screenshot tests are very flaky recently.

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