Well, apparently there were problems with the classifiers (javadoc, sources) upload documentation on sonatype, somehow using the code there generated the same API incompatiilities that the maven-3.8 binaries generate!
I finally produced a prototype version 1.0-pre-alpha-10 from the current PR branch, I know the tag is silly, but that is just to test against the Sonatype requirements.
I see, thank you, I will submit patches for the deployment script in future for sure, I will take a look if this is useful, for now, I managed to sign the files with a public key and send them to the remote repository as a part of GitHub releases.
I have exams next week so I might not be available beyond today to integrate it into the engine, so feel free to add it to the engine and solve the Reflection Allocator issue.
So, feel free to bing me here to release the final 1.0.0 when everything is OK!
This tutorial saves some time, thanks! Maybe we should have another tutorial for publishing artifacts to maven, something specific to trivial builds which is not already on documentation…
I realized this when I was surprised that each jar artifact should have its own POM file, the original project is sub-divided into a “jme3-alloc” sub-project which is a java code for both desktop and android and a “jme3-alloc-native” sub-project for native-code, so this was incompatible with what the Gradle does as standard, as the sub-project “jme3-alloc” outputs both the artifacts and “jme3-alloc-native” doesn’t output artifacts, it only produces the native binaries, I know there must be a way to do this via the Gradle plugins, but this may need a lot of structuring that I am not aware of so far…
Anyway, I found a simple workaround which is dynamically generating the POM file based on the artifactId :
FYI, from my observation when managing jme releases, it usually becomes available in the central repo (repo.maven.apache.org/maven2) in less than 20 minutes but it takes some time to appear in the maven search.
Direct java buffers are only of type java.nio.ByteBuffer, that is stated by the NewDirectByteBuffer jni method.
I think if you want to create a FloatBuffer, you shouldn’t obviously cast, but you should use the method putFloat to put a float data inside the byte buffer.
Luckily, the destroy method signature can be generalized to the abstract Buffer, based on GetDirectBufferAddress, the current jme-alloc method only supports ByteBuffer, so this could be done easily, let me know if this is update is needed.
Yes, and so, all direct buffers are literally only ByteBuffers, byte buffers are contiguous memory chunks, and each chunk resembles 1 byte of data aka. 8-bits, the data could be any primitive data.
The asFloatBuffer just creates a view reference of type FloatBuffer for a previously created byte buffer.
EDIT:
To keep things clear, here is the documentation:
Yep, I totally agree, I was looking for a getter method on the FloatBuffer, so I can fetch the original direct ByteBuffer referenced by it, but I cannot find anything related…
So, the alternative is to accept the abstract java.nio.Buffer instead, the asFloatBuffer documentation states that the created object is a view (reference) of the specified ByteBuffer and changes taking place through it will be reflected on the Original ByteBuffer memory…
Yes, yep sure, the ByteBuffer memory model can be re-oriented as you like! So, in case of FloatBuffer, a float is 4-bytes of contiguous memory and so on, that is why you multiply sizeof(type) by the capacity on the BufferUtils#createFloatBuffer(int) to obtain the total memory to allocate.
EDIT:
If you would like to change this, open an issue to discuss this.
If you would like to use the jme NativeLibraryLoader and disable the stock loader of this library, please open an issue to discuss it too, I already thought of this, it could be simply disabled using a static flag, for instance.
Those issues should be considered before going into beta:
This is something I noticed the last month when before working on the deployment CI/CD, it doesn’t lead to problems with the stock NativeBinaryLoader, but since you want to use the Engine loader instead, it should be standard:
As for the guava JRE issue, I don’t care very much apart from cleaning the unused dependencies, but guava libraries aren’t literally shipped with the output jars or even used on the build compilation bin folder, so they may be used internally by Gradle, anyway it’s not urgent.