Add Crashlytics.

This commit is contained in:
Andres Gomez, Thomas (ITDV CC) - AF (ext) 2023-07-18 14:33:30 +02:00
parent 70c25b0fc5
commit dfc6c4e673
6 changed files with 139 additions and 16 deletions

View file

@ -4,6 +4,8 @@ plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("com.google.dagger.hilt.android")
id("com.google.gms.google-services")
id("com.google.firebase.crashlytics")
id("org.jetbrains.kotlin.kapt")
}
@ -24,8 +26,8 @@ android {
applicationId = "com.pixelized.rplexicon"
minSdk = 26
targetSdk = 33
versionCode = 2
versionName = "0.1.1"
versionCode = 3
versionName = "0.1.2"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
@ -95,11 +97,6 @@ dependencies {
implementation("com.google.accompanist:accompanist-navigation-animation:0.30.1")
implementation("com.google.accompanist:accompanist-placeholder:0.30.1")
// Hilt: Dependency injection
implementation("androidx.hilt:hilt-navigation-compose:1.0.0")
implementation("com.google.dagger:hilt-android:2.45")
kapt("com.google.dagger:hilt-compiler:2.45")
// Google service
implementation("com.google.android.gms:play-services-auth:20.6.0")
implementation(
@ -111,6 +108,16 @@ dependencies {
dependencyConfiguration = { exclude("org.apache.httpcomponents") },
)
// Import the BoM for the Firebase platform
implementation(platform("com.google.firebase:firebase-bom:32.2.0"))
implementation("com.google.firebase:firebase-crashlytics-ktx")
implementation("com.google.firebase:firebase-analytics-ktx")
// Hilt: Dependency injection
implementation("androidx.hilt:hilt-navigation-compose:1.0.0")
implementation("com.google.dagger:hilt-android:2.45")
kapt("com.google.dagger:hilt-compiler:2.45")
// Image
implementation("com.github.skydoves:landscapist-glide:2.1.11")
kapt("com.github.bumptech.glide:compiler:4.14.2") // this have to be align with landscapist-glide

84
app/google-services.json Normal file
View file

@ -0,0 +1,84 @@
{
"project_info": {
"project_number": "62913404482",
"project_id": "rp-lexicon",
"storage_bucket": "rp-lexicon.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:62913404482:android:25aff6034a72116b7c57db",
"android_client_info": {
"package_name": "com.pixelized.rplexicon"
}
},
"oauth_client": [
{
"client_id": "62913404482-3hde1e3sbu49m4gtra6gs4m88mafpibc.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.pixelized.rplexicon",
"certificate_hash": "39ee1766d2225263052d4a4e82182d1c3e886f35"
}
},
{
"client_id": "62913404482-ergqkjiuvint49q8lm555j21vvb6af7s.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyB2Gkrisrjk1s-5U1ufXGambFRBbFFfLuo"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "62913404482-ergqkjiuvint49q8lm555j21vvb6af7s.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:62913404482:android:8d40bf56f21618e27c57db",
"android_client_info": {
"package_name": "com.pixelized.rplexicon.dev"
}
},
"oauth_client": [
{
"client_id": "62913404482-t4vf73vhkh75c96qq38csldrshm21d9o.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.pixelized.rplexicon.dev",
"certificate_hash": "39ee1766d2225263052d4a4e82182d1c3e886f35"
}
},
{
"client_id": "62913404482-ergqkjiuvint49q8lm555j21vvb6af7s.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyB2Gkrisrjk1s-5U1ufXGambFRBbFFfLuo"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "62913404482-ergqkjiuvint49q8lm555j21vvb6af7s.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}

View file

@ -11,8 +11,8 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 2,
"versionName": "0.1.1",
"versionCode": 3,
"versionName": "0.1.2",
"outputFile": "app-release.apk"
}
],

View file

@ -157,7 +157,13 @@ private fun PartyBackground(
Image(
modifier = Modifier
.fillMaxHeight()
.weight(weight = animatedWeight(progress = balance, divergence = 0.95f, position = 1f)),
.weight(
weight = animatedWeight(
progress = balance,
divergence = 0.95f,
position = 1f
)
),
contentScale = ContentScale.FillHeight,
colorFilter = colorFilter,
painter = painterResource(id = images[0]),
@ -172,7 +178,13 @@ private fun PartyBackground(
Image(
modifier = Modifier
.fillMaxHeight()
.weight(weight = animatedWeight(progress = balance, divergence = 0.93f, position = .5f)),
.weight(
weight = animatedWeight(
progress = balance,
divergence = 0.93f,
position = .5f
)
),
contentScale = ContentScale.FillHeight,
colorFilter = colorFilter,
painter = painterResource(id = images[1]),
@ -187,7 +199,13 @@ private fun PartyBackground(
Image(
modifier = Modifier
.fillMaxHeight()
.weight(weight = animatedWeight(progress = balance, divergence = 0.91f, position = 0f)),
.weight(
weight = animatedWeight(
progress = balance,
divergence = 0.91f,
position = 0f
)
),
contentScale = ContentScale.FillHeight,
colorFilter = colorFilter,
painter = painterResource(id = images[2]),
@ -202,7 +220,13 @@ private fun PartyBackground(
Image(
modifier = Modifier
.fillMaxHeight()
.weight(weight = animatedWeight(progress = balance, divergence = 0.93f, position = -.5f)),
.weight(
weight = animatedWeight(
progress = balance,
divergence = 0.93f,
position = -.5f
)
),
contentScale = ContentScale.FillHeight,
colorFilter = colorFilter,
painter = painterResource(id = images[3]),
@ -217,7 +241,13 @@ private fun PartyBackground(
Image(
modifier = Modifier
.fillMaxHeight()
.weight(weight = animatedWeight(progress = balance, divergence = 0.95f, position = -1f)),
.weight(
weight = animatedWeight(
progress = balance,
divergence = 0.95f,
position = -1f
)
),
contentScale = ContentScale.FillHeight,
colorFilter = colorFilter,
painter = painterResource(id = images[4]),

View file

@ -78,7 +78,7 @@ class AuthenticationViewModel @Inject constructor(
repository.updateAuthenticationState()
}
}
.addOnFailureListener { e ->
.addOnFailureListener {
state.value = Authentication.Failure
repository.updateAuthenticationState()
}

View file

@ -1,7 +1,9 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.android.application") version "8.1.0-rc01" apply false
id("com.google.dagger.hilt.android") version "2.44" apply false
id("org.jetbrains.kotlin.android") version "1.8.22" apply false
id("com.google.gms.google-services") version "4.3.14" apply false
id("com.google.dagger.hilt.android") version "2.44" apply false
id("com.google.firebase.crashlytics") version "2.9.7" apply false
id("org.jetbrains.kotlin.kapt") version "1.8.22" apply false
}