diff --git a/android/app/build.gradle b/android/app/build.gradle index 1e9c4e803..f681ad917 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -37,10 +37,10 @@ project.ext.appName = 'CoMaps' //} android { - namespace 'app.organicmaps' + namespace = 'app.organicmaps' // TODO: it should not be here, but in sdk/build.gradle. But for some reason it should be specified here as well. - ndkVersion '28.2.13676358' + ndkVersion = '28.2.13676358' dependenciesInfo { // Disables dependency metadata when building APKs (for IzzyOnDroid/F-Droid) @@ -62,21 +62,21 @@ android { } // All properties are read from gradle.properties file - compileSdk propCompileSdkVersion.toInteger() + compileSdk = propCompileSdkVersion.toInteger() defaultConfig { versionCode = rootProject.ext.versionCode versionName = rootProject.ext.versionName println('Version: ' + versionName) println('VersionCode: ' + versionCode) - minSdk propMinSdkVersion.toInteger() - targetSdk propTargetSdkVersion.toInteger() + minSdk = propMinSdkVersion.toInteger() + targetSdk = propTargetSdkVersion.toInteger() applicationId project.ext.appId buildConfigField 'String', 'SUPPORT_MAIL', '"android@comaps.app"' // Should be customized in flavors. buildConfigField 'String', 'REVIEW_URL', '""' - setProperty('archivesBaseName', appName.replaceAll('\\s','') + '-' + defaultConfig.versionCode) + base.archivesName = appName.replaceAll('\\s','') + '-' + defaultConfig.versionCode ndk.debugSymbolLevel = 'full' } @@ -128,10 +128,10 @@ android { splits.abi { boolean enabled = project.hasProperty('splitApk') println ('Create separate apks: ' + enabled) - enable enabled + enable = enabled reset() include 'x86', 'armeabi-v7a', 'arm64-v8a', 'x86_64' - universalApk true + universalApk = true } lint { @@ -144,7 +144,7 @@ android { disable 'CustomSplashScreen' // https://github.com/organicmaps/organicmaps/issues/3610 disable 'InsecureBaseConfiguration' - abortOnError true + abortOnError = true } gradle.projectsEvaluated { @@ -204,7 +204,7 @@ android { applicationIdSuffix '.debug' // Allows to install debug and release builds together versionNameSuffix '-debug' zipAlignEnabled true - signingConfig signingConfigs.debug + signingConfig = signingConfigs.debug resValue 'string', 'app_name', 'CoMaps Debug' } @@ -212,15 +212,16 @@ android { if (taskName.contains('release')) { if (secureReleasePropertiesFileExists) { println('Using RELEASE signing keys from secure.properties.release') - signingConfig signingConfigs.release + signingConfig = signingConfigs.release } else { println('NO RELEASE signing keys found') println('Using DEBUG signing keys') - signingConfig signingConfigs.debug + signingConfig = signingConfigs.debug } } + minifyEnabled true - shrinkResources true + shrinkResources = true // Includes the default ProGuard rules files that are packaged with the Android Gradle plugin. // To learn more, go to the documentation section about R8 configuration files. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' @@ -233,15 +234,15 @@ android { if (taskName.contains('beta')) { if (secureTestPropertiesFileExists) { println('Using TEST signing keys from secure.properties.test') - signingConfig signingConfigs.test + signingConfig = signingConfigs.test } else { println('NO TEST signing keys found') println('Using DEBUG signing keys') - signingConfig signingConfigs.debug + signingConfig = signingConfigs.debug } } minifyEnabled true - shrinkResources true + shrinkResources = true // Includes the default ProGuard rules files that are packaged with the Android Gradle plugin. // To learn more, go to the documentation section about R8 configuration files. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' @@ -253,7 +254,7 @@ android { // We don't compress these extensions in assets/ because our random FileReader can't read zip-compressed files from apk. // TODO: Load all minor files via separate call to ReadAsString which can correctly handle compressed files in zip containers. androidResources { - ignoreAssetsPattern '!.svn:!.git:!.DS_Store:!*.scc:.*: