@@ -115,16 +115,24 @@ android {
115
115
productFlavors {
116
116
register(" github" ) {
117
117
dimension = " version"
118
+ buildConfigField ' boolean' , ' FIREBASE_AVAILABLE' , ' true'
118
119
}
119
120
register(" beta" ) {
120
121
dimension = " version"
121
122
versionNameSuffix = " -beta3"
123
+ buildConfigField ' boolean' , ' FIREBASE_AVAILABLE' , ' true'
122
124
}
123
125
register(" googleplay" ) {
124
126
dimension = " version"
127
+ buildConfigField ' boolean' , ' FIREBASE_AVAILABLE' , ' true'
125
128
}
126
129
register(" amazon" ) {
127
130
dimension = " version"
131
+ buildConfigField ' boolean' , ' FIREBASE_AVAILABLE' , ' true'
132
+ }
133
+ register(" fdroid" ) {
134
+ dimension = " version"
135
+ buildConfigField ' boolean' , ' FIREBASE_AVAILABLE' , ' false'
128
136
}
129
137
}
130
138
}
@@ -145,10 +153,17 @@ dependencies {
145
153
implementation(" androidx.constraintlayout:constraintlayout:2.1.4" )
146
154
implementation(" androidx.appcompat:appcompat:1.7.0" )
147
155
148
- // Firebase
149
- implementation(' com.google.firebase:firebase-analytics-ktx:22.1.0' )
150
- implementation(" com.google.firebase:firebase-crashlytics-ktx:19.0.3" )
151
- implementation(" com.google.firebase:firebase-perf-ktx:21.0.1" )
156
+ // Firebase (flavor-based conditional implementation)
157
+ def firebase = [
158
+ " com.google.firebase:firebase-analytics-ktx:22.1.0" ,
159
+ " com.google.firebase:firebase-crashlytics-ktx:19.0.3" ,
160
+ " com.google.firebase:firebase-perf-ktx:21.0.1" ,
161
+ ]
162
+ githubImplementation(firebase)
163
+ betaImplementation(firebase)
164
+ googleplayImplementation(firebase)
165
+ amazonImplementation(firebase)
166
+ // fdroidImplementation() <- no firebase in F-Droid :)
152
167
153
168
// Retrofit, OkHttp, and Moshi
154
169
implementation(" com.squareup.retrofit2:retrofit:2.11.0" )
0 commit comments