Browse Source

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>
Álvaro Brey Vilas 3 years ago
parent
commit
12ce7c2837
1 changed files with 2 additions and 0 deletions
  1. 2 0
      app/build.gradle

+ 2 - 0
app/build.gradle

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