Skip to content

Commit

Permalink
moneymong-81 feat: firebase 세팅
Browse files Browse the repository at this point in the history
  • Loading branch information
Heonbyeong committed Dec 3, 2023
1 parent da95656 commit f35f7b8
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 19 deletions.
21 changes: 2 additions & 19 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
alias(libs.plugins.moneymong.android.application)
alias(libs.plugins.moneymong.android.application.compose)
alias(libs.plugins.moneymong.android.application.flavors)
alias(libs.plugins.moneymong.android.application.firebase)
// alias(libs.plugins.moneymong.android.hilt) hilt compiler was found error
}

Expand Down Expand Up @@ -48,24 +49,6 @@ android {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}

// flavorDimensions += "deploy"
// productFlavors {
// create("tb") {
// dimension = "deploy"
// applicationIdSuffix = ".tb"
//
// manifestPlaceholders["appLabel"] = "머니몽 TB"
// buildConfigField("Boolean", "IS_TB", "true")
// }
// create("live") {
// dimension = "deploy"
// applicationIdSuffix = ".live"
//
// manifestPlaceholders["appLable"] = "머니몽"
// buildConfigField("Boolean", "IS_TB", "false")
// }
// }
}

dependencies {
Expand All @@ -74,6 +57,6 @@ dependencies {

implementation(projects.data)
implementation(projects.domain)

implementation(projects.feature.sign)
}
29 changes: 29 additions & 0 deletions app/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"project_info": {
"project_number": "1091533625653",
"project_id": "moneymong-9e794",
"storage_bucket": "moneymong-9e794.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:1091533625653:android:cbcd471ed618616dad547c",
"android_client_info": {
"package_name": "com.moneymong.moneymong"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyAb9dOMs-B-u9YynEWdtV9nrq_VbMpAXtg"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"
}
4 changes: 4 additions & 0 deletions build-logic/convention/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ gradlePlugin {
id = "moneymong.android.hilt"
implementationClass = "AndroidHiltConventionPlugin"
}
register("androidFirebase") {
id = "moneymong.android.application.firebase"
implementationClass = "AndroidApplicationFirebaseConventionPlugin"
}
register("androidFlavors") {
id = "moneymong.android.application.flavors"
implementationClass = "AndroidApplicationFlavorsConventionPlugin"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import org.gradle.api.Plugin
import org.gradle.api.Project
import com.moneymong.moneymong.buildlogic.convention.libs
import org.gradle.kotlin.dsl.dependencies

class AndroidApplicationFirebaseConventionPlugin : Plugin<Project> {
override fun apply(target: Project) {
with(target) {
with(pluginManager) {
apply("com.google.gms.google-services")
apply("com.google.firebase.crashlytics")
}

dependencies {
val bom = libs.findLibrary("firebase-bom").get()
add("implementation", platform(bom))
"implementation"(libs.findLibrary("firebase.crashlytics").get())
}
}
}
}
2 changes: 2 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ plugins {
alias(libs.plugins.android.test) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.jvm) apply false
alias(libs.plugins.firebase.crashlytics) apply false
alias(libs.plugins.gms) apply false
alias(libs.plugins.hilt) apply false
alias(libs.plugins.ksp) apply false
}
9 changes: 9 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ androidxDatastore = "1.0.0"
androidxEspresso = "3.5.1"
androidHiltNavigationCompose = "1.0.0"
desugaring = "1.2.2"
firebaseBom = "32.6.0"
firebaseCrashlyticsPlugin = "2.9.9"
glide = "1.0.0-alpha.1"
gmsPlugin = "4.4.0"
hilt = "2.48.1"
hiltNavigation = "1.0.0"
junit4 = "4.13.2"
Expand All @@ -42,6 +45,9 @@ androidx-lifecycle-livedata-ktx = { group = "androidx.lifecycle", name = "lifecy
androidx-navigation-compose = { group = "androidx.navigation", name = "navigation-compose", version.ref = "androidxComposeNavigation" }
androidx-test-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "androidxEspresso" }
desugaring = { group = "com.android.tools", name = "desugar_jdk_libs", version.ref = "desugaring" }
firebase-analytics = { group = "com.google.firebase", name = "firebase-analytics-ktx" }
firebase-bom = { group = "com.google.firebase", name = "firebase-bom", version.ref = "firebaseBom"}
firebase-crashlytics = { group = "com.google.firebase", name = "firebase-crashlytics-ktx" }
hilt-android = { group = "com.google.dagger", name = "hilt-android", version.ref = "hilt" }
hilt-compiler = { group = "com.google-dagger", name = "hilt-android-compiler", version.ref = "hilt" }
hilt-navigation = { group = "androidx.hilt", name = "hilt-navigation-compose", version.ref = "hiltNavigation" }
Expand All @@ -64,13 +70,16 @@ androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "a
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" }
android-test = { id = "com.android.test", version.ref = "androidGradlePlugin" }
firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebaseCrashlyticsPlugin" }
gms = { id = "com.google.gms.google-services", version.ref = "gmsPlugin" }
hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }

moneymong-android-application = { id = "moneymong.android.application", version = "unspecified" }
moneymong-android-application-compose = { id = "moneymong.android.application.compose", version = "unspecified" }
moneymong-android-application-firebase = { id = "moneymong.android.application.firebase", version = "unspecified" }
moneymong-android-application-flavors = { id = "moneymong.android.application.flavors", version = "unspecified" }
moneymong-android-feature = { id = "moneymong.android.feature", version = "unspecified" }
moneymong-android-hilt = { id = "moneymong.android.hilt", version = "unspecified" }
Expand Down

0 comments on commit f35f7b8

Please sign in to comment.