Centralize NDK and CMAKE versions

Signed-off-by: Álvaro Brey Vilas <alvaro.brey@nextcloud.com>
This commit is contained in:
Álvaro Brey Vilas 2022-03-15 14:41:05 +01:00
parent 3b5d9ddabf
commit ec98c5db52
No known key found for this signature in database
GPG Key ID: 2585783189A62105
3 changed files with 13 additions and 2 deletions

View File

@ -20,7 +20,9 @@ jobs:
distribution: "temurin"
java-version: 11
- name: Install NDK and cmake
run: /usr/local/lib/android/sdk/tools/bin/sdkmanager 'ndk;21.4.7075529' 'cmake;3.18.1'
run: |
source ndk.env
/usr/local/lib/android/sdk/tools/bin/sdkmanager "ndk;${NDK_VERSION}" "cmake;${CMAKE_VERSION}"
- name: Build QA
if: ${{ steps.check-secrets.outputs.ok == 'true' }}
env:

View File

@ -69,11 +69,18 @@ def versionMinor = 20
def versionPatch = 0
def versionBuild = 0 // 0-50=Alpha / 51-98=RC / 90-99=stable
def ndkEnv = new HashMap<String, String>()
file("$project.rootDir/ndk.env").readLines().each() {
def (key, value) = it.tokenize('=')
ndkEnv.put(key, value)
}
android {
compileSdkVersion 31
// install this NDK version and Cmake to produce smaller APKs. Build will still work if not installed
ndkVersion "21.4.7075529"
ndkVersion "${ndkEnv.get("NDK_VERSION")}"
defaultConfig {
minSdkVersion 23

2
ndk.env Normal file
View File

@ -0,0 +1,2 @@
NDK_VERSION=21.4.7075529
CMAKE_VERSION=3.18.1