Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrated Firebase #77

Merged
merged 5 commits into from
Dec 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
44 changes: 26 additions & 18 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ plugins {
id 'kotlin-kapt'
id 'dagger.hilt.android.plugin'
id 'androidx.navigation.safeargs.kotlin'
id 'com.google.gms.google-services'
}

android {
compileSdk 31
compileSdk 33

defaultConfig {
applicationId "org.openlake.sampoorna"
minSdk 21
targetSdk 31
targetSdk 33
versionCode 1
versionName "1.0"

Expand All @@ -34,49 +35,56 @@ android {

dependencies {
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'androidx.navigation:navigation-fragment-ktx:2.4.1'
implementation 'androidx.navigation:navigation-ui-ktx:2.4.1'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.3'
implementation 'androidx.navigation:navigation-ui-ktx:2.5.3'

//UI
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'com.google.android.material:material:1.5.0'
implementation 'com.airbnb.android:lottie:5.0.3'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.google.android.material:material:1.6.0'
implementation 'com.airbnb.android:lottie:5.2.0'

//Scalable Unit Scales
implementation 'com.intuit.sdp:sdp-android:1.0.6'
implementation 'com.intuit.ssp:ssp-android:1.0.6'

//Coroutines
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.0'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4'

//Room db
implementation "androidx.room:room-runtime:2.4.2"
kapt "androidx.room:room-compiler:2.4.2"
implementation "androidx.room:room-runtime:2.4.3"
kapt "androidx.room:room-compiler:2.4.3"

//Lifecycle components
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.4.1"
implementation "androidx.lifecycle:lifecycle-viewmodel-savedstate:2.4.1"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.5.1"
implementation "androidx.lifecycle:lifecycle-viewmodel-savedstate:2.5.1"
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'

//Testing
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'

//Dagger-Hilt
implementation("com.google.dagger:hilt-android:$hilt_version")
kapt("com.google.dagger:hilt-android-compiler:$hilt_version")
implementation group: 'androidx.lifecycle', name: 'lifecycle-viewmodel-ktx', version: '2.4.1'
implementation group: 'androidx.lifecycle', name: 'lifecycle-viewmodel-ktx', version: '2.5.1'
kapt("androidx.hilt:hilt-compiler:1.0.0")

//Location by Play Services
implementation 'com.google.android.gms:play-services-location:19.0.1'
implementation 'com.google.android.gms:play-services-location:21.0.1'

// Retrofit
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation "com.squareup.okhttp3:okhttp:5.0.0-alpha.7"

// Firebase
implementation platform('com.google.firebase:firebase-bom:31.0.2')
implementation 'com.google.android.gms:play-services-auth:20.4.0'
implementation 'com.google.firebase:firebase-auth-ktx'
implementation 'com.google.firebase:firebase-firestore-ktx'
implementation 'com.google.gms:google-services:4.3.14'

}
47 changes: 47 additions & 0 deletions app/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"project_info": {
"project_number": "942233783691",
"project_id": "sampoorna-b9781",
"storage_bucket": "sampoorna-b9781.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:942233783691:android:d3e1a21c108bd74431f38e",
"android_client_info": {
"package_name": "org.openlake.sampoorna"
}
},
"oauth_client": [
{
"client_id": "942233783691-7rkdkmaimmtf238l8p1lm2er672lpjgk.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "org.openlake.sampoorna",
"certificate_hash": "ebd59f5c1e7313ffd6f881cfdcbf5136bbf3e184"
}
},
{
"client_id": "942233783691-s25rlu7839hi2djtghv1ln4vj9123ssf.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDGM2H2UlqGX4v_fDa_Q9bWuK2WLrw5q7A"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "942233783691-s25rlu7839hi2djtghv1ln4vj9123ssf.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}
27 changes: 0 additions & 27 deletions app/src/main/java/org/openlake/sampoorna/data/auth/AuthApi.kt

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package org.openlake.sampoorna.data.constants

object Constants {
const val Users = "users"
const val Blogs = "blogs"
}

This file was deleted.

20 changes: 9 additions & 11 deletions app/src/main/java/org/openlake/sampoorna/data/di/Transformer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,22 @@ object Transformer {
fun convertUserModelToUserEntity(user: User):UserEntity{
return UserEntity(
name = user.name,
address = user.address,
id = user.id,
bloodGroup = user.bloodGroup,
address = null,
id = 0,
bloodGroup = null,
sosMessage = user.sosMessage,
age = user.age,
age = null,
email = user.email
)
}

fun convertUserEntityToUserModel(userEntity: UserEntity):User{
return User(
name = userEntity.name,
address = userEntity.address,
id = userEntity.id,
bloodGroup = userEntity.bloodGroup,
sosMessage = userEntity.sosMessage,
age = userEntity.age,
email = userEntity.email
name = userEntity.name ?: "",
sosMessage = userEntity.sosMessage ?: "",
email = userEntity.email ?: "",
uid = "",
username = ""
)
}
}

This file was deleted.

This file was deleted.