Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GSON global version (Gradle) #2305

Closed

Conversation

JNightRider
Copy link
Contributor

It seems that the gson library is used by 2 modules: jme3-plugins and jme3-plugins-json-gson, this can be tedious when gson has a new version and needs to be updated, it would have to be changed in 2 places (modules)

This PR mainly changes the way the dependency is implemented, the version has been defined globally the same as with lwjgl3 (version)

@stephengold
Copy link
Member

Thanks for your contribution, @JNightRider .

A little history: the situation this PR addresses is a direct consequence of PR #2278, which was a temporary solution for a bug in PR #2060.

Long term, it would be better to figure out why PR #2060 broke glTF importing and solve that issue, so we could go back to jme3-plugins not depending on the gson library at all. Such a solution would make this PR unnecessary.

Furthermore, the current best practice for coding library versions in Gradle builds is not to hard-code them into common.gradle or other Gradle scripts, but instead to use a version catalog. If you want to simplify version upgrades, that would be a better way to go.

@stephengold stephengold added the buildscript An issue with the buildscript label Aug 21, 2024
@JNightRider
Copy link
Contributor Author

JNightRider commented Aug 21, 2024

Hi @stephengold

Thanks for reviewing this PR...

Long term, it would be better to figure out why PR #2060 broke glTF importing and solve that issue

You're right, I think it's the best option. I will do some research on that matter (this may take time)

Furthermore, the current best practice for coding library versions in Gradle builds is not to hard-code them into common.gradle or other Gradle scripts, but instead to use a version catalog. If you want to simplify version upgrades, that would be a better way to go.

It would be interesting to apply this in regards to how lwjgl3 and nifty are versioned (maybe with gson if the problem is still not resolved - PR #2060). I would like to implement it (if possible, I don't promise anything), this would change the main goal of this PR which is the gson version but it is still the same path.

For now I'll leave this PR as a draft, as it may change...

@JNightRider JNightRider marked this pull request as draft August 21, 2024 03:41
@stephengold
Copy link
Member

It would be cleaner to create 2 new PRs: one to create the version catalog and one to properly resolve the issue with PR #2060.
If a version catalog were created, this PR could be closed as obsolete.

@JNightRider
Copy link
Contributor Author

JNightRider commented Sep 17, 2024

There is a PR (#2311) that replaces this...

@JNightRider JNightRider deleted the Gradle_gson_version branch September 17, 2024 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
buildscript An issue with the buildscript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants