diff --git a/app/build.gradle.kts b/app/build.gradle.kts index d02a571..07eb31b 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -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 diff --git a/app/google-services.json b/app/google-services.json new file mode 100644 index 0000000..585f264 --- /dev/null +++ b/app/google-services.json @@ -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" +} \ No newline at end of file diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json index f9f85a7..e7c919c 100644 --- a/app/release/output-metadata.json +++ b/app/release/output-metadata.json @@ -11,8 +11,8 @@ "type": "SINGLE", "filters": [], "attributes": [], - "versionCode": 2, - "versionName": "0.1.1", + "versionCode": 3, + "versionName": "0.1.2", "outputFile": "app-release.apk" } ], diff --git a/app/src/main/java/com/pixelized/rplexicon/ui/screens/authentication/AuthenticationScreen.kt b/app/src/main/java/com/pixelized/rplexicon/ui/screens/authentication/AuthenticationScreen.kt index 40efea1..42a8d9e 100644 --- a/app/src/main/java/com/pixelized/rplexicon/ui/screens/authentication/AuthenticationScreen.kt +++ b/app/src/main/java/com/pixelized/rplexicon/ui/screens/authentication/AuthenticationScreen.kt @@ -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]), diff --git a/app/src/main/java/com/pixelized/rplexicon/ui/screens/authentication/AuthenticationViewModel.kt b/app/src/main/java/com/pixelized/rplexicon/ui/screens/authentication/AuthenticationViewModel.kt index 536df92..b385d11 100644 --- a/app/src/main/java/com/pixelized/rplexicon/ui/screens/authentication/AuthenticationViewModel.kt +++ b/app/src/main/java/com/pixelized/rplexicon/ui/screens/authentication/AuthenticationViewModel.kt @@ -78,7 +78,7 @@ class AuthenticationViewModel @Inject constructor( repository.updateAuthenticationState() } } - .addOnFailureListener { e -> + .addOnFailureListener { state.value = Authentication.Failure repository.updateAuthenticationState() } diff --git a/build.gradle.kts b/build.gradle.kts index 546f759..0896045 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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 } \ No newline at end of file