build: Specify NDK version (optional install)

If this + CMake is installed, native libraries are correctly stripped, and then APK size is reduced.
If not installed, everything still works as we don't actually need to compile any native stuff.

If `ndkVersion` is not specified, then the default version for Android Gradle Plugin is expected,
and stripping will not work even if other NDK version is installed. So it's better to use a
specific version, to prevent it from stopping working in the future.

Signed-off-by: Álvaro Brey Vilas <alvaro.brey@nextcloud.com>
This commit is contained in:
Álvaro Brey Vilas 2022-03-15 10:22:23 +01:00
parent 55c9811db6
commit 12ce7c2837
No known key found for this signature in database
GPG key ID: 2585783189A62105

View file

@ -72,6 +72,8 @@ def versionBuild = 0 // 0-50=Alpha / 51-98=RC / 90-99=stable
android {
compileSdkVersion 31
// install this NDK version and Cmake to produce smaller APKs. Build will still work if not installed
ndkVersion "21.4.7075529"
defaultConfig {
minSdkVersion 23