barsoosayque / libgdx-oboe

🎶 libGDX audio replacement for Android (API 16+) built on top of Oboe.
MIT License
54 stars 10 forks source link

Bundle natives in AAR #2

Closed barsoosayque closed 3 years ago

barsoosayque commented 4 years ago

As it was before 0.2.2 version, it should be possible for users to define only one dependency on libgdx-oboe (without using the natives configuration). This should work out of the box, and it also worked before.

la-matthew-yang commented 3 years ago

How does this work? Does the aar file include all the native libraries? As of 0.2.3, only the .so files of the correct abi filters are packaged into apk. Will that stay the same?

barsoosayque commented 3 years ago

Does the aar file include all the native libraries?

Yep.

As of 0.2.3, only the .so files of the correct abi filters are packaged into apk. Will that stay the same?

I believe so. AAR is basically an archive, so it should not affect build artifacts (such as apk).

barsoosayque commented 3 years ago

Should be fixed starting from v0.2.4.

la-matthew-yang commented 3 years ago

I have tried it and everything is working as intended. Can this same process be applied to libgdx native libraries as well? I don't see why it can't. If this works, it can remove the need for libgdx native dependencies and the task copyAndroidNatives.

barsoosayque commented 3 years ago

Phew, I was worried it won't find libraries. It can be done with libgdx natives as well, although, if I remember this correctly, they are keeping multiple jars for some compatibility reasons. It's fairly easy to migrate to aar.

la-matthew-yang commented 3 years ago

I see. That is good to know.