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

Add Android gradle build script with NDK cmake and prefab packaging (+ on device test script) #1041

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

jg-hot
Copy link

@jg-hot jg-hot commented Oct 31, 2024

Added an android subdirectory for building a prefab package and .aar with the Android NDK and gradle build system.

The build script supports building a ready-to-use android library (.aar) via:
cd android/ && gradle assembleRelease

Tests may be run on a connected device or emulator via:
cd android/ && gradle ndkTest

See the updated documentation in Building-for-Android.md for details.

@arthurt
Copy link
Member

arthurt commented Nov 16, 2024

Cool, hey thanks.

I have limited experience with Gradle, very little with Android dev, so I don't think I can review this. @SoapGentoo @evpobr ?

Would you, @jg-hot , feel confident maintaining this build system?

@jg-hot
Copy link
Author

jg-hot commented Nov 16, 2024

@arthurt Absolutely. I do feel comfortable with this build given that the tests are running and passing on:

  • x86_64 emulator
  • arm64-v8a physical device
  • Emulator running API 35 with 16KB page sizes: there was a recent change in the NDK which required all NDK code to be rebuilt with new flags. This is already supported and passing for libsndfile.

If it would be helpful, I can provide the test output (I know not everyone has access to the environment / devices to run the tests). I would also be fine merging changes from this branch into my fork, running the tests, and updating anything if necessary (although breaking changes should be unlikely).

I will probably migrate this build to eliminate the gradle dependency following the pattern that Oboe uses, at some point. You would still need the NDK installed (to build), prefab and mvn (to publish), and adb and a device or emulator to test.

I also have an open PR for an Android build for libsamplerate and I'm working on libmp3lame and a few other libraries as well.

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.

2 participants