I am trying to build the AOSP Latin IME (source code: https://android.googlesource.com/platform/packages/inputmethods/LatinIME/+/master) without downloading the entire AOSP source code. Ideally, I would like to build the project as a Gradle project, so I can easily integrate it with my existing Android apps.
I have already made some progress by
1] creating a blank project in Android Studio
2] copy-pasting the "java" and "java-overridable" folders and copy-pasting the contents of the "res" folder into my project
However, while the project compiles, the keyboard crashes when opened because of the following error:
Could not load native library jni_latinime
This error makes sense because I have not built and included the C++ native library (found here: https://android.googlesource.com/platform/packages/inputmethods/LatinIME/+/master/native/jni/) that is required for the keyboard to function.
How can I build the native library found at the above link and include it in my Gradle project? Is there any way to compile these C++ files without downloading the entire AOSP source?
The project comes with an "Android.bp" file that seems to specify how to compile the C++ files. Unfortunately, I can't figure out how to use the Soong build system. https://android.googlesource.com/platform/packages/inputmethods/LatinIME/+/master/native/jni/Android.bp