Gradle configuration to compile the AOSP keyboard "LatinIME" to an android apk package.
git clone https://github.com/ColinKinloch/LatinIME_apk.git
cd LatinIME_apk
git submodule update --init --recursive
TARGET_BUILD_APPS=true ./gradlew assembleDebug
The apk will be output to ./build/outputs/apk/debug/LatinIME-debug.apk
This cannot be installed if an application with the id "com.android.inputmethod.latin" is already installed on the device.