Skip to content

Commit

Permalink
Merge pull request #28 from YAPP-Github/feature/issue-009-firebase
Browse files Browse the repository at this point in the history
[ISSUE-009] 파이어베이스 크래시리틱스 추가
  • Loading branch information
jihee-dev authored May 30, 2022
2 parents 5e9b70c + d04dea9 commit 887b839
Show file tree
Hide file tree
Showing 19 changed files with 295 additions and 25 deletions.
169 changes: 166 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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/
Expand Down Expand Up @@ -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
9 changes: 7 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}
39 changes: 39 additions & 0 deletions app/google-services.json
Original file line number Diff line number Diff line change
@@ -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"
}
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
android:supportsRtl="true"
android:theme="@style/Theme.Growth">
<activity
android:name=".ui.MainActivity"
android:name=".presentation.MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.Growth">
Expand Down
2 changes: 2 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions buildSrc/src/main/java/Configs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions buildSrc/src/main/java/ProjectDependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
}
22 changes: 13 additions & 9 deletions buildSrc/src/main/java/Versions.kt
Original file line number Diff line number Diff line change
@@ -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"
}
8 changes: 6 additions & 2 deletions buildSrc/src/main/java/app/ModuleDependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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"
}
2 changes: 2 additions & 0 deletions buildSrc/src/main/java/app/Plugins.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
4 changes: 4 additions & 0 deletions data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
7 changes: 6 additions & 1 deletion presentation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
}
Loading

0 comments on commit 887b839

Please sign in to comment.