diff --git a/.gitignore b/.gitignore index 347e252e..383d17b7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# Created by https://www.toptal.com/developers/gitignore/api/android,androidstudio,macos +# Edit at https://www.toptal.com/developers/gitignore?templates=android,androidstudio,macos + # Gradle files .gradle/ build/ @@ -26,8 +29,168 @@ render.experimental.xml *.jks *.keystore -# Google Services (e.g. APIs or Firebase) -google-services.json - # Android Profiling *.hprof + +### Android Patch ### +gen-external-apklibs + +# Replacement of .externalNativeBuild directories introduced +# with Android Studio 3.5. + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### macOS Patch ### +# iCloud generated files +*.icloud + +### AndroidStudio ### +# Covers files to be ignored for android development using Android Studio. + +# Built application files +*.ap_ +*.aab + +# Files for the ART/Dalvik VM +*.dex + +# Java class files +*.class + +# Generated files +bin/ +gen/ +out/ + +# Gradle files +.gradle + +# Signing files +.signing/ + +# Local configuration file (sdk path, etc) + +# Proguard folder generated by Eclipse +proguard/ + +# Log Files + +# Android Studio +/*/build/ +/*/local.properties +/*/out +/*/*/build +/*/*/production +.navigation/ +*.ipr +*~ +*.swp + +# Keystore files + +# Google Services (e.g. APIs or Firebase) +# google-services.json + +# Android Patch + +# External native build folder generated in Android Studio 2.2 and later +.externalNativeBuild + +# NDK +obj/ + +# IntelliJ IDEA +*.iws +/out/ + +# User-specific configurations +.idea/caches/ +.idea/libraries/ +.idea/shelf/ +.idea/workspace.xml +.idea/tasks.xml +.idea/.name +.idea/compiler.xml +.idea/copyright/profiles_settings.xml +.idea/encodings.xml +.idea/misc.xml +.idea/modules.xml +.idea/scopes/scope_settings.xml +.idea/dictionaries +.idea/vcs.xml +.idea/jsLibraryMappings.xml +.idea/datasources.xml +.idea/dataSources.ids +.idea/sqlDataSources.xml +.idea/dynamic.xml +.idea/uiDesigner.xml +.idea/assetWizardSettings.xml +.idea/gradle.xml +.idea/jarRepositories.xml +.idea/navEditor.xml + +# Legacy Eclipse project files +.classpath +.project +.cproject +.settings/ + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.war +*.ear + +# virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml) +hs_err_pid* + +## Plugin-specific files: + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Mongo Explorer plugin +.idea/mongoSettings.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +### AndroidStudio Patch ### + +!/gradle/wrapper/gradle-wrapper.jar + +# End of https://www.toptal.com/developers/gitignore/api/android,androidstudio,macos \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 54a75ac4..594ef776 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -4,15 +4,16 @@ plugins { id(app.Plugins.ANDROID_APPLICATION) id(app.Plugins.KOTLIN_ANDROID) id(app.Plugins.KOTLIN_KAPT) + id(app.Plugins.GOOGLE_SERVICE) + id(app.Plugins.FIREBASE_CRASHLYTICS) id(app.Plugins.HILT_ANDROID) } android { - namespace = "com.yapp.growth" compileSdk = Configs.COMPILE_SDK defaultConfig { - applicationId = "com.yapp.growth" + applicationId = Configs.APPLICATION_ID minSdk = Configs.MIN_SDK targetSdk = Configs.TARGET_SDK versionCode = Configs.VERSION_CODE @@ -47,4 +48,8 @@ dependencies { app.ModuleDependencies.hilt.implement(this) app.ModuleDependencies.hiltAndroid.implement(this) app.ModuleDependencies.timber.implement(this) + + implementation(platform(app.ModuleDependencies.FIREBASE_BOM)) + implementation(app.ModuleDependencies.FIREBASE_ANALYTICS) + implementation(app.ModuleDependencies.FIREBASE_CRASHLYTICS) } \ No newline at end of file diff --git a/app/google-services.json b/app/google-services.json new file mode 100644 index 00000000..84fc357a --- /dev/null +++ b/app/google-services.json @@ -0,0 +1,39 @@ +{ + "project_info": { + "project_number": "626079185695", + "project_id": "planz-82728", + "storage_bucket": "planz-82728.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:626079185695:android:a0c32837fa7d87257cce2a", + "android_client_info": { + "package_name": "com.yapp.growth" + } + }, + "oauth_client": [ + { + "client_id": "626079185695-j6kgiofc8h8tqh8gu8talv5c1soq866s.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyAyx8MnwBiLESMNMhh0yARVCWxWkBiIs9U" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "626079185695-j6kgiofc8h8tqh8gu8talv5c1soq866s.apps.googleusercontent.com", + "client_type": 3 + } + ] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 7af725d8..36e04de5 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -11,7 +11,7 @@ android:supportsRtl="true" android:theme="@style/Theme.Growth"> diff --git a/build.gradle.kts b/build.gradle.kts index f6163f12..5840b8fb 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,6 +8,8 @@ buildscript { classpath(ProjectDependencies.ANDROID_BUILD_TOOL) classpath(ProjectDependencies.KOTLIN_GRADLE_PLUGIN) classpath(ProjectDependencies.HILT_GRADLE_PLUGIN) + classpath(ProjectDependencies.FIREBASE_CRASHLYTICS) + classpath(ProjectDependencies.GOOGLE_SERVICE) } }// Top-level build file where you can add configuration options common to all sub-projects/modules. allprojects { diff --git a/buildSrc/src/main/java/Configs.kt b/buildSrc/src/main/java/Configs.kt index e0a755f2..9a10b8a5 100644 --- a/buildSrc/src/main/java/Configs.kt +++ b/buildSrc/src/main/java/Configs.kt @@ -3,6 +3,7 @@ object Configs { const val COMPILE_SDK = 32 //Android Default Config + const val APPLICATION_ID = "com.yapp.growth" const val MIN_SDK = 26 const val TARGET_SDK = 32 const val VERSION_CODE = 1 diff --git a/buildSrc/src/main/java/ProjectDependencies.kt b/buildSrc/src/main/java/ProjectDependencies.kt index 3eebd078..74f1e19d 100644 --- a/buildSrc/src/main/java/ProjectDependencies.kt +++ b/buildSrc/src/main/java/ProjectDependencies.kt @@ -2,4 +2,6 @@ object ProjectDependencies { const val ANDROID_BUILD_TOOL = "com.android.tools.build:gradle:${Versions.ANDROID_BUILD_TOOL}" const val KOTLIN_GRADLE_PLUGIN = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.KOTLIN}" const val HILT_GRADLE_PLUGIN = "com.google.dagger:hilt-android-gradle-plugin:${Versions.HILT}" + const val GOOGLE_SERVICE = "com.google.gms:google-services:${Versions.GOOGLE_SERVICE}" + const val FIREBASE_CRASHLYTICS = "com.google.firebase:firebase-crashlytics-gradle:${Versions.FIREBASE_CRASHLYTICS}" } \ No newline at end of file diff --git a/buildSrc/src/main/java/Versions.kt b/buildSrc/src/main/java/Versions.kt index bdca1df6..454dcfa0 100644 --- a/buildSrc/src/main/java/Versions.kt +++ b/buildSrc/src/main/java/Versions.kt @@ -1,18 +1,22 @@ +// alphabet 순서대로 정렬 object Versions { + const val ANDROID_APP_COMPAT = "1.4.1" const val ANDROID_BUILD_TOOL = "7.2.0" const val ANDROID_CORE = "1.7.0" - const val KOTLIN = "1.6.10" - const val COMPOSE = "1.1.1" - const val ACTIVITY_COMPOSE = "1.4.0" - const val ANDROID_APP_COMPAT = "1.4.1" - const val CONSTRAINT_LAYOUT = "2.1.3" const val COIL = "1.4.0" - const val LIFECYCLE = "2.4.1" + const val COMPOSE = "1.2.0-alpha08" + const val COMPOSE_ACTIVITY = "1.4.0" + const val CONSTRAINT_LAYOUT = "2.1.3" + const val FIREBASE_BOM = "29.1.0" + const val FIREBASE_CRASHLYTICS = "2.9.0" + const val GOOGLE_SERVICE = "4.3.10" + const val HILT = "2.42" + const val HILT_ANDROID = "1.0.0-beta01" const val JUNIT = "4.13.2" + const val KOTLIN = "1.6.20" const val KOTLIN_COROUTINES = "1.5.1" - const val RETROFIT = "2.7.1" + const val LIFECYCLE = "2.4.1" const val OKHTTP = "4.3.1" - const val HILT = "2.42" - const val HILT_ANDROID = "1.0.0-beta01" + const val RETROFIT = "2.7.1" const val TIMBER = "5.0.1" } \ No newline at end of file diff --git a/buildSrc/src/main/java/app/ModuleDependencies.kt b/buildSrc/src/main/java/app/ModuleDependencies.kt index 79a3e5c9..8de5c08b 100644 --- a/buildSrc/src/main/java/app/ModuleDependencies.kt +++ b/buildSrc/src/main/java/app/ModuleDependencies.kt @@ -63,7 +63,7 @@ object ModuleDependencies { ), DependencyInfo( "androidx.activity:activity-compose", - Versions.ACTIVITY_COMPOSE, + Versions.COMPOSE_ACTIVITY, Method.IMPLEMENTATION ), DependencyInfo("io.coil-kt:coil-compose", Versions.COIL, Method.IMPLEMENTATION) @@ -121,8 +121,12 @@ object ModuleDependencies { Method.IMPLEMENTATION ), ) - + val timber = arrayOf( DependencyInfo("com.jakewharton.timber:timber", Versions.TIMBER, Method.IMPLEMENTATION) ) + + const val FIREBASE_BOM = "com.google.firebase:firebase-bom:${Versions.FIREBASE_BOM}" + const val FIREBASE_ANALYTICS = "com.google.firebase:firebase-analytics-ktx" + const val FIREBASE_CRASHLYTICS = "com.google.firebase:firebase-crashlytics-ktx" } diff --git a/buildSrc/src/main/java/app/Plugins.kt b/buildSrc/src/main/java/app/Plugins.kt index 3faaf59c..ca70890c 100644 --- a/buildSrc/src/main/java/app/Plugins.kt +++ b/buildSrc/src/main/java/app/Plugins.kt @@ -7,5 +7,7 @@ object Plugins { const val KOTLIN_ANDROID = "kotlin-android" const val KOTLIN_KAPT = "kotlin-kapt" const val KOTLIN_PARCELIZE = "kotlin-parcelize" + const val GOOGLE_SERVICE = "com.google.gms.google-services" + const val FIREBASE_CRASHLYTICS = "com.google.firebase.crashlytics" const val HILT_ANDROID = "dagger.hilt.android.plugin" } \ No newline at end of file diff --git a/data/build.gradle.kts b/data/build.gradle.kts index 596a8064..777b6c6a 100644 --- a/data/build.gradle.kts +++ b/data/build.gradle.kts @@ -32,4 +32,8 @@ dependencies { app.ModuleDependencies.okhttp.implement(this) app.ModuleDependencies.hilt.implement(this) app.ModuleDependencies.timber.implement(this) + + implementation(platform(app.ModuleDependencies.FIREBASE_BOM)) + implementation(app.ModuleDependencies.FIREBASE_ANALYTICS) + implementation(app.ModuleDependencies.FIREBASE_CRASHLYTICS) } \ No newline at end of file diff --git a/presentation/build.gradle.kts b/presentation/build.gradle.kts index 0e5ab599..70864bc1 100644 --- a/presentation/build.gradle.kts +++ b/presentation/build.gradle.kts @@ -5,11 +5,12 @@ plugins { id(app.Plugins.KOTLIN_ANDROID) id(app.Plugins.KOTLIN_PARCELIZE) id(app.Plugins.KOTLIN_KAPT) + id(app.Plugins.GOOGLE_SERVICE) + id(app.Plugins.FIREBASE_CRASHLYTICS) id(app.Plugins.HILT_ANDROID) } android { - namespace = "com.yapp.presentation" compileSdk = Configs.COMPILE_SDK defaultConfig { @@ -42,4 +43,8 @@ dependencies { app.ModuleDependencies.hilt.implement(this) app.ModuleDependencies.hiltAndroid.implement(this) app.ModuleDependencies.timber.implement(this) + + implementation(platform(app.ModuleDependencies.FIREBASE_BOM)) + implementation(app.ModuleDependencies.FIREBASE_ANALYTICS) + implementation(app.ModuleDependencies.FIREBASE_CRASHLYTICS) } \ No newline at end of file diff --git a/presentation/google-services.json b/presentation/google-services.json new file mode 100644 index 00000000..473ed047 --- /dev/null +++ b/presentation/google-services.json @@ -0,0 +1,39 @@ +{ + "project_info": { + "project_number": "626079185695", + "project_id": "planz-82728", + "storage_bucket": "planz-82728.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:626079185695:android:a0c32837fa7d87257cce2a", + "android_client_info": { + "package_name": "com.yapp.growth.presentation" + } + }, + "oauth_client": [ + { + "client_id": "626079185695-j6kgiofc8h8tqh8gu8talv5c1soq866s.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyAyx8MnwBiLESMNMhh0yARVCWxWkBiIs9U" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "626079185695-j6kgiofc8h8tqh8gu8talv5c1soq866s.apps.googleusercontent.com", + "client_type": 3 + } + ] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/presentation/src/main/AndroidManifest.xml b/presentation/src/main/AndroidManifest.xml index 93239b15..2862f124 100644 --- a/presentation/src/main/AndroidManifest.xml +++ b/presentation/src/main/AndroidManifest.xml @@ -1,2 +1,2 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/presentation/src/main/java/com/yapp/growth/ui/MainActivity.kt b/presentation/src/main/java/com/yapp/growth/presentation/MainActivity.kt similarity index 92% rename from presentation/src/main/java/com/yapp/growth/ui/MainActivity.kt rename to presentation/src/main/java/com/yapp/growth/presentation/MainActivity.kt index 1a7d43ec..a6ea157e 100644 --- a/presentation/src/main/java/com/yapp/growth/ui/MainActivity.kt +++ b/presentation/src/main/java/com/yapp/growth/presentation/MainActivity.kt @@ -1,4 +1,4 @@ -package com.yapp.growth.ui +package com.yapp.growth.presentation import android.os.Bundle import androidx.activity.ComponentActivity @@ -10,7 +10,7 @@ import androidx.compose.material.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview -import com.yapp.growth.ui.theme.GrowthTheme +import com.yapp.growth.presentation.theme.GrowthTheme class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { diff --git a/presentation/src/main/java/com/yapp/growth/ui/theme/Color.kt b/presentation/src/main/java/com/yapp/growth/presentation/theme/Color.kt similarity index 80% rename from presentation/src/main/java/com/yapp/growth/ui/theme/Color.kt rename to presentation/src/main/java/com/yapp/growth/presentation/theme/Color.kt index fefa6f2b..f93e98ea 100644 --- a/presentation/src/main/java/com/yapp/growth/ui/theme/Color.kt +++ b/presentation/src/main/java/com/yapp/growth/presentation/theme/Color.kt @@ -1,4 +1,4 @@ -package com.yapp.growth.ui.theme +package com.yapp.growth.presentation.theme import androidx.compose.ui.graphics.Color diff --git a/presentation/src/main/java/com/yapp/growth/ui/theme/Shape.kt b/presentation/src/main/java/com/yapp/growth/presentation/theme/Shape.kt similarity index 86% rename from presentation/src/main/java/com/yapp/growth/ui/theme/Shape.kt rename to presentation/src/main/java/com/yapp/growth/presentation/theme/Shape.kt index b2368321..f062973d 100644 --- a/presentation/src/main/java/com/yapp/growth/ui/theme/Shape.kt +++ b/presentation/src/main/java/com/yapp/growth/presentation/theme/Shape.kt @@ -1,4 +1,4 @@ -package com.yapp.growth.ui.theme +package com.yapp.growth.presentation.theme import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material.Shapes diff --git a/presentation/src/main/java/com/yapp/growth/ui/theme/Theme.kt b/presentation/src/main/java/com/yapp/growth/presentation/theme/Theme.kt similarity index 96% rename from presentation/src/main/java/com/yapp/growth/ui/theme/Theme.kt rename to presentation/src/main/java/com/yapp/growth/presentation/theme/Theme.kt index e5ceafbf..76682343 100644 --- a/presentation/src/main/java/com/yapp/growth/ui/theme/Theme.kt +++ b/presentation/src/main/java/com/yapp/growth/presentation/theme/Theme.kt @@ -1,4 +1,4 @@ -package com.yapp.growth.ui.theme +package com.yapp.growth.presentation.theme import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.material.MaterialTheme diff --git a/presentation/src/main/java/com/yapp/growth/ui/theme/Type.kt b/presentation/src/main/java/com/yapp/growth/presentation/theme/Type.kt similarity index 94% rename from presentation/src/main/java/com/yapp/growth/ui/theme/Type.kt rename to presentation/src/main/java/com/yapp/growth/presentation/theme/Type.kt index c0580c78..761a01a5 100644 --- a/presentation/src/main/java/com/yapp/growth/ui/theme/Type.kt +++ b/presentation/src/main/java/com/yapp/growth/presentation/theme/Type.kt @@ -1,4 +1,4 @@ -package com.yapp.growth.ui.theme +package com.yapp.growth.presentation.theme import androidx.compose.material.Typography import androidx.compose.ui.text.TextStyle