瀏覽代碼

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 年之前
父節點
當前提交
12ce7c2837
共有 1 個文件被更改,包括 2 次插入0 次删除
  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 {
 
     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