diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 3354f5f7..d4fae930 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -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 } @@ -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 { @@ -74,6 +57,6 @@ dependencies { implementation(projects.data) implementation(projects.domain) - + implementation(projects.feature.sign) } \ No newline at end of file diff --git a/app/google-services.json b/app/google-services.json new file mode 100644 index 00000000..28268895 --- /dev/null +++ b/app/google-services.json @@ -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" +} \ No newline at end of file diff --git a/build-logic/convention/build.gradle.kts b/build-logic/convention/build.gradle.kts index bf6cd99f..8b6c3ca5 100644 --- a/build-logic/convention/build.gradle.kts +++ b/build-logic/convention/build.gradle.kts @@ -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" diff --git a/build-logic/convention/src/main/java/AndroidApplicationFirebaseConventionPlugin.kt b/build-logic/convention/src/main/java/AndroidApplicationFirebaseConventionPlugin.kt new file mode 100644 index 00000000..7fb7074d --- /dev/null +++ b/build-logic/convention/src/main/java/AndroidApplicationFirebaseConventionPlugin.kt @@ -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 { + 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()) + } + } + } +} \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index cc8aa2b0..1d765426 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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 } \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b5567c9d..6cb8d6df 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -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" @@ -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" } @@ -64,6 +70,8 @@ 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" } @@ -71,6 +79,7 @@ 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" }