Those last weeks I've been quite busy working in one new feature for raylib 1.8, a custom Android APK build pipeline based on plain Makefile (no gradle, no ndk-build, no ant) to build raylib native apps. The truth is that it took me longer than expected, facing several issues
and understanding how all APK generation process works for native apps.
I decided to do that for various reasons:
1) Learn and understand how all APK generation process worked (no build black-boxes)
2) Simplify, if possible, the build process with a "simple" plain Makefile
3) Starting from a simple project folder structure (what my students use), just generate the .apk (same way a .exe is generated)
Here it is a simple diagram of what I wanted to accomplish:
myproject --> resources
--> raylib_game.c ----> [make] -----> mygame.apk
After a bunch of hours, just got it and I thought it could be useful for someone, specially the Handmade community.
I created a fully configurable Makefile.Android
with some project templates for raylib
Basically, the Makefile generates everything from scratch
, build folder structure, required resources, required Java files, AndroidManifest.xml... and compiles the provided source files into a library and later packs everything into an APK. All the process is commented in the same file, to serve as a tutorial.
Some of the benefits of using this custom APK building are generation times (down to a couple of seconds) and APK size; a simple raylib game with no audio could be around ~200KB apk or less and including OpenAL Soft audio library it's about ~600KB apk... An everything with a simple and easy-to-use Makefile.
Please, let me know yout thoughts! :)