From 566c9cdaddbb73746acadd47636cac1262b09907 Mon Sep 17 00:00:00 2001 From: Roman Tsisyk Date: Sun, 11 Feb 2024 16:10:52 +0200 Subject: [PATCH] [android] Add .web suffix to Web version Allow installation of Web version alongside of other versions. Signed-off-by: Roman Tsisyk --- android/app/build.gradle | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index eeeca1abc7..6c1b785613 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -241,6 +241,7 @@ android { web { dimension 'default' + applicationIdSuffix '.web' versionName = android.defaultConfig.versionName + '-Web' buildConfigField 'String', 'SUPPORT_MAIL', '"apk@organicmaps.app"' } @@ -420,12 +421,12 @@ tasks.withType(JavaCompile) { options.compilerArgs << '-Xlint:unchecked' << '-Xlint:deprecation' } -android.buildTypes.all { buildType -> - def suffix = applicationIdSuffix != null ? applicationIdSuffix : "" - def authorityValue = android.defaultConfig.applicationId + suffix + ".provider" +android.applicationVariants.all { variant -> + def authorityValue = variant.applicationId + ".provider" def authority = "\"" + authorityValue + "\"" - buildConfigField 'String', 'FILE_PROVIDER_AUTHORITY', authority - manifestPlaceholders += [FILE_PROVIDER_PLACEHOLDER : authorityValue] + variant.buildConfigField 'String', 'FILE_PROVIDER_AUTHORITY', authority + def flavor = variant.getMergedFlavor() + flavor.manifestPlaceholders += [FILE_PROVIDER_PLACEHOLDER : authorityValue] } task prepareGoogleReleaseListing {