@@ -85,7 +85,8 @@ val selectableVariants = listOf(
8585 " playProdQuickstart" ,
8686 " playStagingQuickstart" ,
8787 " websiteProdSpinner" ,
88- " websiteProdRelease" ,
88+ " websiteFossProdRelease" ,
89+ " websiteGmsProdRelease" ,
8990 " githubProdSpinner" ,
9091 " githubProdRelease"
9192)
@@ -159,7 +160,7 @@ android {
159160
160161 ndkVersion = libs.versions.ndk.get()
161162
162- flavorDimensions + = listOf (" distribution" , " environment" )
163+ flavorDimensions + = listOf (" distribution" , " gms " , " environment" )
163164
164165 android.bundle.language.enableSplit = false
165166
@@ -446,8 +447,10 @@ android {
446447 }
447448
448449 create(" website" ) {
450+ val MAU = if (gradle.startParameter.taskRequests.toString().contains(" Foss" )) " false" else " true"
451+
449452 dimension = " distribution"
450- buildConfigField(" boolean" , " MANAGES_APP_UPDATES" , " true " )
453+ buildConfigField(" boolean" , " MANAGES_APP_UPDATES" , " ${ MAU } " )
451454 buildConfigField(" String" , " APK_UPDATE_MANIFEST_URL" , " \" https://updates.signal.org/android/latest.json\" " )
452455 buildConfigField(" String" , " BUILD_DISTRIBUTION_TYPE" , " \" website\" " )
453456 }
@@ -468,6 +471,17 @@ android {
468471 buildConfigField(" boolean" , " LINK_DEVICE_UX_ENABLED" , " true" )
469472 }
470473
474+ create(" gms" ) {
475+ dimension = " gms"
476+ isDefault = true
477+ buildConfigField(" boolean" , " USE_OSM" , " false" )
478+ }
479+
480+ create(" foss" ) {
481+ dimension = " gms"
482+ buildConfigField(" boolean" , " USE_OSM" , " true" )
483+ }
484+
471485 create(" prod" ) {
472486 dimension = " environment"
473487
@@ -759,14 +773,16 @@ dependencies {
759773 implementation(libs.androidx.emoji2)
760774 implementation(libs.androidx.paging.runtime)
761775 implementation(libs.androidx.paging.compose)
762- implementation (libs.firebase.messaging) {
776+ " gmsImplementation " (libs.firebase.messaging) {
763777 exclude(group = " com.google.firebase" , module = " firebase-core" )
764778 exclude(group = " com.google.firebase" , module = " firebase-analytics" )
765779 exclude(group = " com.google.firebase" , module = " firebase-measurement-connector" )
766780 }
767- implementation(libs.google.play.services.maps)
768- implementation(libs.google.play.services.auth)
769- implementation(libs.google.signin)
781+ " gmsImplementation" (libs.google.play.services.maps)
782+ " gmsImplementation" (libs.google.play.services.auth)
783+ " gmsImplementation" (libs.google.signin)
784+ " fossImplementation" (project(" :lib:fakegms" ))
785+ " fossImplementation" (libs.osmdroid)
770786 implementation(libs.androidx.media)
771787 implementation(libs.bundles.media3)
772788 implementation(libs.conscrypt.android)
@@ -806,15 +822,16 @@ dependencies {
806822 implementation(libs.accompanist.drawablepainter)
807823 implementation(libs.kotlin.stdlib.jdk8)
808824 implementation(libs.kotlin.reflect)
809- implementation (libs.kotlinx.coroutines.play.services)
825+ " gmsImplementation " (libs.kotlinx.coroutines.play.services)
810826 implementation(libs.kotlinx.coroutines.rx3)
811827 implementation(libs.jackson.module.kotlin)
812828 implementation(libs.rxjava3.rxandroid)
813829 implementation(libs.rxjava3.rxkotlin)
814830 implementation(libs.rxdogtag)
815831 implementation(libs.kotlinx.serialization.json)
816832
817- implementation(project(" :lib:billing" ))
833+ " gmsImplementation" (project(" :lib:billing" ))
834+ " fossImplementation" (project(" :lib:fakebilling" ))
818835 implementation(project(" :feature:media-send" ))
819836
820837 " spinnerImplementation" (project(" :lib:spinner" ))
0 commit comments