Skip to content

Commit

Permalink
Removed firebase
Browse files Browse the repository at this point in the history
Removed some unused resources
  • Loading branch information
duartebarbosadev committed Jan 27, 2025
1 parent 1e98290 commit e2b9ac2
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 201 deletions.
5 changes: 0 additions & 5 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import com.scrolless.app.ScrollessBuildType
plugins {
alias(libs.plugins.scrolless.android.application)
alias(libs.plugins.scrolless.android.application.flavors)
alias(libs.plugins.scrolless.android.application.firebase)
alias(libs.plugins.scrolless.hilt)
alias(libs.plugins.kotlin.android)
}
Expand Down Expand Up @@ -131,9 +130,5 @@ dependencies {
androidTestImplementation(libs.test.androidx.junit)
androidTestImplementation(libs.test.androidx.espresso.core)

implementation(platform(libs.firebase.bom))

implementation(libs.firebase.crashlytics)

implementation(libs.facebook.shimmer)
}
86 changes: 0 additions & 86 deletions app/google-services.json

This file was deleted.

4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
Copyright (C) 2025, Scrolless
All rights reserved.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Expand Down Expand Up @@ -44,5 +45,4 @@
android:name=".features.main.MainActivity"
android:exported="false" />
</application>

</manifest>
2 changes: 0 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ plugins {
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.parcelize) apply false
alias(libs.plugins.google.services) apply false
alias(libs.plugins.firebase.crashlytics) apply false
alias(libs.plugins.firebase.perf) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.hilt) apply false
}
6 changes: 0 additions & 6 deletions buildLogic/convention/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ kotlin {
dependencies {
compileOnly(libs.android.gradlePlugin)
compileOnly(libs.android.tools.common)
compileOnly(libs.firebase.crashlytics.gradlePlugin)
compileOnly(libs.firebase.performance.gradlePlugin)
compileOnly(libs.kotlin.gradlePlugin)
compileOnly(libs.ksp.gradlePlugin)
implementation(libs.test.truth)
Expand Down Expand Up @@ -54,10 +52,6 @@ gradlePlugin {
id = "scrolless.hilt"
implementationClass = "HiltConventionPlugin"
}
register("androidFirebase") {
id = "scrolless.android.application.firebase"
implementationClass = "AndroidApplicationFirebaseConventionPlugin"
}
register("androidFlavors") {
id = "scrolless.android.application.flavors"
implementationClass = "AndroidApplicationFlavorsConventionPlugin"
Expand Down

This file was deleted.

18 changes: 0 additions & 18 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ coil = "2.7.0"

tink = "1.15.0"

firebaseBom = "33.8.0"

sheets = "2.3.1"

contacts = "0.3.2"
Expand All @@ -69,23 +67,12 @@ okhttp = "4.12.0"

# Plugins
googleServices = "4.4.2"
firebaseCrashlyticsPlugin = "3.0.2"
firebasePerfPlugin = "1.4.2"
firebaseCrashlyticsKtx = "19.4.0"
viewbinding = "8.8.0"
preferenceKtx = "1.2.1"
preference = "1.2.1"

[libraries]

# Used in KotlinAndroid build logic - don't remove
firebase-analytics = { group = "com.google.firebase", name = "firebase-analytics" }
firebase-bom = { group = "com.google.firebase", name = "firebase-bom", version.ref = "firebaseBom" }
firebase-cloud-messaging = { group = "com.google.firebase", name = "firebase-messaging" }
firebase-crashlytics = { group = "com.google.firebase", name = "firebase-crashlytics" }
firebase-crashlytics-ktx = { group = "com.google.firebase", name = "firebase-crashlytics-ktx", version.ref = "firebaseCrashlyticsKtx" }
firebase-performance = { group = "com.google.firebase", name = "firebase-perf" }

# Used in KotlinAndroid build logic - don't remove
android-desugarJdkLibs = { group = "com.android.tools", name = "desugar_jdk_libs", version.ref = "androidDesugarJdkLibs" }

Expand Down Expand Up @@ -131,8 +118,6 @@ tink-android = { group = "com.google.crypto.tink", name = "tink-android", versio
# Dependencies of the included build-logic
android-gradlePlugin = { group = "com.android.tools.build", name = "gradle", version.ref = "androidGradlePlugin" }
android-tools-common = { group = "com.android.tools", name = "common", version.ref = "androidTools" }
firebase-crashlytics-gradlePlugin = { group = "com.google.firebase", name = "firebase-crashlytics-gradle", version.ref = "firebaseCrashlyticsPlugin" }
firebase-performance-gradlePlugin = { group = "com.google.firebase", name = "perf-plugin", version.ref = "firebasePerfPlugin" }
kotlin-gradlePlugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" }
ksp-gradlePlugin = { group = "com.google.devtools.ksp", name = "com.google.devtools.ksp.gradle.plugin", version.ref = "ksp" }

Expand Down Expand Up @@ -195,12 +180,9 @@ kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }
google-services = { id = "com.google.gms.google-services", version.ref = "googleServices" }
firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebaseCrashlyticsPlugin" }
firebase-perf = { id = "com.google.firebase.firebase-perf", version.ref = "firebasePerfPlugin" }

# Plugins defined by this project
scrolless-android-application = { id = "scrolless.android.application" }
scrolless-android-application-firebase = { id = "scrolless.android.application.firebase" }
scrolless-android-application-flavors = { id = "scrolless.android.application.flavors" }
scrolless-android-feature = { id = "scrolless.android.feature" }
scrolless-android-library = { id = "scrolless.android.library" }
Expand Down
2 changes: 0 additions & 2 deletions libraries/framework/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ dependencies {
implementation(libs.androidx.preference)
testImplementation(projects.libraries.testutils)

implementation(libs.firebase.crashlytics.ktx)

// AndroidX Libraries
implementation(libs.androidx.appcompat)
implementation(libs.androidx.core.ktx)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,12 @@
*/
package com.scrolless.framework.core.base.application

import android.util.Log
import com.google.firebase.crashlytics.FirebaseCrashlytics
import timber.log.Timber

class TimberInitializer : AppInitializer {
override fun init(application: CoreApplication<*>) {
if (application.appConfig().isDev()) {
Timber.plant(Timber.DebugTree())
} else {
Timber.plant(FireBaseCrashlyticsTree())
}
}

internal class FireBaseCrashlyticsTree : Timber.Tree() {
override fun log(priority: Int, tag: String?, message: String, t: Throwable?) {
when (priority) {
Log.VERBOSE, Log.DEBUG -> return
}

val exception = t ?: Exception(message)

// Initialize FirebaseCrashlytics instance
val crashlytics = FirebaseCrashlytics.getInstance()

// Log the message
crashlytics.log("$tag: $message")

// Set custom key (optional but useful for filtering)
tag?.let { crashlytics.setCustomKey("TAG", it) }

// Record the exception
crashlytics.recordException(exception)
}
}
}

0 comments on commit e2b9ac2

Please sign in to comment.