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

Gradle: Problems with '+' sign in version number #26

Closed
Scrappers-glitch opened this issue May 10, 2022 · 7 comments
Closed

Gradle: Problems with '+' sign in version number #26

Scrappers-glitch opened this issue May 10, 2022 · 7 comments

Comments

@Scrappers-glitch
Copy link

I have tested the new Minie-4.9.0+bare and Minie-4.9.0+ano parts of Minie library on android, and i found out that the bare part always replaces the ano part if both are added as dependencies, i suspect the problem comes from using '+' sign in declaring minie parts, in which gradle consumes it as a different version of minie, so a suggestion for the next release and for an eventual fix is to omit the '+' sign from minie parts and replace it by library-module:version classical way of defining library parts.

So, this is better :

implementation "com.github.stephengold:Minie-bare:5.x.x"
implementation "com.github.stephengold:Minie-ano:5.x.x"

instead of this :

implementation "com.github.stephengold:Minie:5.x.x+bare"
implementation "com.github.stephengold:Minie:5.x.x+bare"

By doing this, you are actually creating different artificatId names under the hood under the same library.

@github-actions
Copy link

Open an issue ONLY if you've found a reproducible defect in the software or its documentation. If you need help, use the JMonkeyEngine Forum.

@stephengold
Copy link
Owner

The renaming can take place with the next release.

  1. Have you verified that this issue occurs with more recent versions of Gradle, such as 6.9.2?
  2. Have you verified that renaming one of the libraries solves the issue?

@Scrappers-glitch
Copy link
Author

Scrappers-glitch commented May 12, 2022

  1. The issue (and the warning against the usage of '+" sign in version number) persists with gradle-6.9.2 and gradle-7.0.
  2. The problem is with the part version makes it invalid, its not with the lib name, the issue is resolved when using :
implementation 'com.github.stephengold:Minie:4.9.0'

OR when adding the contents or Minie+ano manually in the android lib folder.

  1. The problem also occurs with any gradle non-android project (desktop project), if i tried to add both bare and ano parts, the ano is ignored, even though the warning doesn't exist on a non-android project.

@Scrappers-glitch
Copy link
Author

If you want to separate android natives from Minie, then you shouldn't use the '+' sign in version numbers, gradle will anticipate this as different versions of a same thing (which is not the case), instead it's better for new Minie versions to use a different modular expression with a dash Minie-bare:5.x.x and Minie-ano:5.x.x.

@Scrappers-glitch Scrappers-glitch changed the title Android: Problems with '+' sign in version number Gradle: Problems with '+' sign in version number May 12, 2022
@stephengold
Copy link
Owner

stephengold commented Jul 12, 2022

For Minie v5, I've created an Android-only version of the library (Minie-5.0.0+droid) that includes both the java classes and the native libraries. As the name suggests, this is a version of Minie-5.0.0 that's specifically for Android projects. That should solve this issue.

@Scrappers-glitch please verify so I can close this issue.

@stephengold
Copy link
Owner

No response after a month, so I'll assume the solution is satisfactory.

@Scrappers-glitch
Copy link
Author

No response after a month, so I'll assume the solution is satisfactory.

Hello @sgold, sorry for very late reply, I was very busy those last two months, besides cleaning out my notifications that got cluttered up, I haven't tested these changes yet on android to assure the issue is resolved, but we can just keep this closed for now, I will be back on jme the next month or so and i will use Minie on android, so if something happens about this issue, we can reopen it...thanks for the update !

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

No branches or pull requests

2 participants