[android] Remove Firebase dependencies

Signed-off-by: jeanbaptisteC <jeanbaptistec@noreply.codeberg.org>
This commit is contained in:
Jean-Baptiste
2025-05-19 20:39:53 +02:00
committed by Konstantin Pastbin
parent 1813e3da3c
commit bd8d068783
5 changed files with 0 additions and 101 deletions

3
.gitignore vendored
View File

@@ -139,10 +139,7 @@ private.h
android/release.keystore
android/secure.properties
android/libnotify.properties
android/google-services.json
android/google-play.json
android/firebase-app-distribution.json
android/firebase-test-lab.json
android/huawei-appgallery.json
android/res/xml/network_security_config.xml
./server/

View File

@@ -2,15 +2,11 @@
/nativeOutputs
# ignore private keys
/google-services.json
/secure.properties
/release.keystore
/secure.properties
/libnotify.properties
/google-services.json
/google-play.json
/firebase-app-distribution.json
/firebase-test-lab.json
/huawei-appgallery.json
/agconnect-services.json
/src/main/res/xml/network_security_config.xml

View File

@@ -3,36 +3,14 @@ buildscript {
google()
mavenCentral()
}
//
// The magic below is needed to disable Google Firebase Services during the build time.
// Unfortunately, the only way to disable Gradle plugins is to add these hardcore switches to buildscript().
//
// Detect flavors from the task name.
def taskName = getGradle().getStartParameter().getTaskRequests().toString().toLowerCase()
def isFdroid = taskName.contains('fdroid')
def isBeta = taskName.contains('beta')
// Firebase Crashlytics compile-time feature flag: -Pfirebase=true|false
def googleFirebaseServicesFlag = findProperty('firebase')
// Enable Firebase for all beta flavors except fdroid only if google-services.json exists.
def googleFirebaseServicesDefault = isBeta && !isFdroid && file("$projectDir/google-services.json").exists()
ext.googleFirebaseServicesEnabled = googleFirebaseServicesFlag != null ?
googleFirebaseServicesFlag == '' || googleFirebaseServicesFlag.toBoolean() :
googleFirebaseServicesDefault
dependencies {
classpath libs.android.tools
if (googleFirebaseServicesEnabled) {
println('Building with Google Firebase Services')
classpath libs.google.services
classpath libs.google.firebase.crashlytics
classpath libs.google.firebase.appdistribution
} else {
println('Building without Google Firebase Services')
}
classpath(libs.triplet.play.publisher)
classpath(libs.huawei.publish)
}
@@ -45,11 +23,6 @@ repositories {
}
apply plugin: 'com.android.application'
if (googleFirebaseServicesEnabled) {
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'com.google.firebase.appdistribution'
}
apply plugin: 'com.github.triplet.play'
apply plugin: 'ru.cian.huawei-publish-gradle-plugin'
@@ -285,14 +258,6 @@ android {
resValue 'string', 'app_name', 'Debug CoMaps'
// Do not generate separate debug symbols for debug apps, because we don't distribute them.
ndk.debugSymbolLevel = 'none'
if (googleFirebaseServicesEnabled) {
// Keep debug symbols for test lab.
ndk.debugSymbolLevel = 'symbol_table'
firebaseCrashlytics {
nativeSymbolUploadEnabled true
}
}
}
release {
@@ -305,12 +270,6 @@ android {
resValue 'string', 'app_name', project.ext.appName
// Full size symbols are too big for Google, 217mb aab vs 95mb.
ndk.debugSymbolLevel = 'symbol_table'
if (googleFirebaseServicesEnabled) {
firebaseCrashlytics {
nativeSymbolUploadEnabled true
}
}
}
beta {
@@ -326,19 +285,6 @@ android {
resValue 'string', 'app_name', 'Beta CoMaps'
// Full size symbols are too big for Google, 217mb aab vs 95mb.
ndk.debugSymbolLevel = 'symbol_table'
if (googleFirebaseServicesEnabled) {
firebaseCrashlytics {
nativeSymbolUploadEnabled true
}
firebaseAppDistribution {
// A new beta release is created for each commit.
// Use the last commit message for the release notes.
releaseNotes = getCommitMessage()
groups = 'qa' // Notify only selected people.
serviceCredentialsFile = "$projectDir/firebase-app-distribution.json"
}
}
}
}
@@ -384,16 +330,6 @@ dependencies {
// F-droid because it's Apache-2.0.
fdroidImplementation libs.microg.services.location
// Google Firebase Services
if (googleFirebaseServicesEnabled) {
// Import the BoM for the Firebase platform
implementation platform(libs.google.firebase.bom)
// Add the dependencies for the Crashlytics and Analytics libraries
// When using the BoM, you don't specify versions in Firebase library dependencies
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-crashlytics-ndk'
}
// This line is added as a workaround for duplicate classes error caused by some outdated dependency:
// > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
// We don't use Kotlin, but some dependencies are actively using it.

View File

@@ -5,14 +5,11 @@ androidxCarApp = "1.7.0-rc01"
[libraries]
android-tools = { module = "com.android.tools.build:gradle", version.ref = "androidGradlePlugin" }
google-services = { module = "com.google.gms:google-services", version = "4.4.2" }
google-firebase-crashlytics = { module = "com.google.firebase:firebase-crashlytics-gradle", version = "3.0.2" }
google-firebase-appdistribution = { module = "com.google.firebase:firebase-appdistribution-gradle", version = "5.0.0" }
triplet-play-publisher = { module = "com.github.triplet.gradle:play-publisher", version = "3.10.1" }
huawei-publish = { module = "ru.cian:huawei-publish-gradle-plugin", version = "1.4.2" }
android-tools-desugar = { module = "com.android.tools:desugar_jdk_libs", version = "2.1.4" }
google-services-location = { module = "com.google.android.gms:play-services-location", version = "21.3.0" }
microg-services-location = { module = "org.microg.gms:play-services-location", version = "0.3.6.244735" }
google-firebase-bom = { module = "com.google.firebase:firebase-bom", version = "33.5.1" }
androidx-core = { module = "androidx.core:core", version = "1.15.0" }
jetbrains-kotlin-bom = { module = "org.jetbrains.kotlin:kotlin-bom", version = "2.1.10" }
androidx-annotation = { module = "androidx.annotation:annotation", version = "1.9.1" }

View File

@@ -3,9 +3,6 @@ This file contains a list of all sensitive credentials, access keys, authenticat
- [PRIVATE\_H](#private_h)
- [RELEASE\_KEYSTORE](#release_keystore)
- [SECURE\_PROPERTIES](#secure_properties)
- [FIREBASE\_APP\_DISTRIBUTION\_JSON](#firebase_app_distribution_json)
- [FIREBASE\_TEST\_LAB\_JSON](#firebase_test_lab_json)
- [GOOGLE\_SERVICES\_JSON](#google_services_json)
- [GOOGLE\_PLAY\_JSON](#google_play_json)
- [HUAWEI\_APPGALLERY\_JSON](#huawei_appgallery_json)
- [AGCONNECT\_SERVICES\_JSON](#agconnect_services_json)
@@ -41,30 +38,6 @@ gh secret set SECURE_PROPERTIES --env beta --body "$(base64 < android/app/secure
gh secret set SECURE_PROPERTIES --env production --body "$(base64 < android/app/secure.properties)"
```
## FIREBASE_APP_DISTRIBUTION_JSON
Credentials for uploading betas to Google Firebase App Distribution.
```bash
gh secret set FIREBASE_APP_DISTRIBUTION_JSON --env beta --body "$(base64 < android/app/firebase-app-distribution.json)"
```
## FIREBASE_TEST_LAB_JSON
Credentials for using Firebase Test Lab ("Monkey").
```bash
gh secret set FIREBASE_TEST_LAB_JSON --env beta --body "$(base64 < android/app/firebase-test-lab.json)"
```
## GOOGLE_SERVICES_JSON
Credentials for using Firebase Crashlytics.
```bash
gh secret set GOOGLE_SERVICES_JSON --env beta --body "$(base64 < android/app/google-services.json)"
```
## GOOGLE_PLAY_JSON
Credentials for uploading Android releases to Google Play.