Skip to content

Commit

Permalink
Merge branch 'base/sprint-2' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
haeti-dev committed May 29, 2024
2 parents c1d181b + 9fbd418 commit 38c0b1e
Show file tree
Hide file tree
Showing 273 changed files with 6,682 additions and 4,200 deletions.
21 changes: 19 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'com.google.gms.google-services'
id 'com.google.firebase.crashlytics'
id 'kotlin-kapt'
id 'com.google.dagger.hilt.android'
id 'kotlin-parcelize'
Expand Down Expand Up @@ -30,14 +31,14 @@ android {
applicationId "com.sopt.smeem"
minSdk 28
targetSdk 34
versionCode 20240403
versionCode 20240527
/*
x.y.z
x: ui, 주요기능의 큰 변화
y: 기능 추가, 가시적인 변화
z: 오류 수정, 긴급 업데이트 사항
*/
versionName "1.2.0"
versionName "2.0.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
buildConfigField "String", "KAKAO_API_KEY", properties['kakao_api_key']
Expand All @@ -46,6 +47,7 @@ android {
buildConfigField "String", "DEEPL_API_KEY", properties['deepl_api_key']
buildConfigField "String", "DEV_AMPLITUDE_API_KEY", properties['dev_amplitude_api_key']
buildConfigField "String", "PROD_AMPLITUDE_API_KEY", properties['prod_amplitude_api_key']
buildConfigField "String", "APPFLYER_DEV_KEY", properties['appsflyer_dev_key']
manifestPlaceholders = [KAKAO_API_KEY: properties['kakao_api_key_manifest']]
vectorDrawables {
useSupportLibrary true
Expand Down Expand Up @@ -174,6 +176,7 @@ dependencies {
implementation(libs.firebase.config.ktx)
implementation(libs.firebase.analytics.ktx)
implementation(libs.firebase.messaging.ktx)
implementation(libs.firebase.crashlytics.ktx)
// test
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
Expand All @@ -189,6 +192,8 @@ dependencies {
implementation(libs.glide)
// Amplitude
implementation(libs.analytics.android)
// Browser
implementation(libs.androidx.browser)

// Compose
implementation(platform(libs.androidx.compose.bom))
Expand All @@ -207,11 +212,23 @@ dependencies {
// Compose navigation
implementation(libs.androidx.navigation.compose)

// hilt navigation compose
implementation(libs.androidx.hilt.navigation.compose)

// coil compose
implementation(libs.coil.compose)

// Optional - Integration with activities
implementation(libs.androidx.activity.compose)
// Optional - Integration with ViewModels
implementation(libs.androidx.lifecycle.viewmodel.compose)

// Orbit
implementation(libs.bundles.orbit)

// Appsflyer
implementation(libs.appsflyer.android.sdk)

// Compose test
androidTestImplementation(platform(libs.androidx.compose.bom))
androidTestImplementation(libs.androidx.compose.ui.test.junit4)
Expand Down
6 changes: 5 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,8 @@
### Glide ---- END

-keep class com.sopt.smeem.data.model.response.** { *; }
-keep class com.sopt.smeem.data.model.request.** { *; }
-keep class com.sopt.smeem.data.model.request.** { *; }

# Appsflyer
-keep class com.appsflyer.** { *; }
-keep class kotlin.jvm.internal.** { *; }
60 changes: 30 additions & 30 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission
android:name="com.google.android.gms.permission.AD_ID"
tools:node="remove" />
Expand All @@ -13,34 +14,22 @@
android:value="false" />

<application
tools:replace="icon, label"
android:name=".Smeem"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="${appIcon}"
android:label="${appName}"
android:supportsRtl="true"
android:theme="@style/Theme.Smeem"
android:usesCleartextTraffic="true"
tools:replace="icon, label"
tools:targetApi="31">

<activity
android:name=".presentation.mypage.MyPageMoreActivity"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name=".presentation.agreement.AgreementViewActivity"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name=".presentation.mypage.EditTrainingTimeActivity"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name=".presentation.mypage.DisplayTrainingGoalActivity"
android:exported="false"
android:screenOrientation="portrait" /> <!-- Splash -->
<!-- Splash -->
<activity
android:name=".presentation.splash.SplashStartActivity"
android:exported="true"
Expand All @@ -51,6 +40,28 @@

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data
android:host="smeem.onelink.me"
android:scheme="https" />
</intent-filter>

<intent-filter>
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data
android:host="splash"
android:scheme="smeem" />
</intent-filter>
</activity>
<activity
android:name=".presentation.splash.SplashLoginActivity"
Expand Down Expand Up @@ -109,26 +120,15 @@
</intent-filter>
</activity>
<activity
android:name=".presentation.mypage.ChangingNicknameActivity"
android:exported="false"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateAlwaysVisible|adjustResize" />
<activity
android:name=".presentation.mypage.MyPageActivity"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name=".presentation.mypage.MyBadgesActivity"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name=".presentation.mypage.EditTrainingGoalActivity"
android:name=".presentation.home.HomeActivity"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name=".presentation.home.HomeActivity"
android:name=".presentation.mypage.MyPageActivity"
android:exported="false"
android:screenOrientation="portrait" /> <!-- Messaging Service -->
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize" />
<!-- Messaging Service -->
<service
android:name=".MessagingService"
android:exported="false">
Expand Down
Binary file modified app/src/main/ic_smeem-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 0 additions & 9 deletions app/src/main/java/com/sopt/smeem/LanguageCode.kt

This file was deleted.

32 changes: 32 additions & 0 deletions app/src/main/java/com/sopt/smeem/Smeem.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import android.app.Application
import androidx.appcompat.app.AppCompatDelegate
import com.amplitude.android.Amplitude
import com.amplitude.android.Configuration
import com.appsflyer.AppsFlyerLib
import com.appsflyer.deeplink.DeepLinkResult
import com.kakao.sdk.common.KakaoSdk
import com.sopt.smeem.BuildConfig.APPFLYER_DEV_KEY
import com.sopt.smeem.BuildConfig.DEV_AMPLITUDE_API_KEY
import com.sopt.smeem.BuildConfig.KAKAO_API_KEY
import com.sopt.smeem.BuildConfig.PROD_AMPLITUDE_API_KEY
Expand All @@ -25,6 +28,35 @@ class Smeem : Application() {
if (BuildConfig.DEBUG) Timber.plant(Timber.DebugTree())
KakaoSdk.init(this, KAKAO_API_KEY)
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO)
setOnelink()
}

private fun setOnelink() {
val appsFlyer = AppsFlyerLib.getInstance()
appsFlyer.init(APPFLYER_DEV_KEY, null, this)
appsFlyer.subscribeForDeepLink { deepLinkResult ->
when (deepLinkResult.status) {
DeepLinkResult.Status.FOUND -> {
Timber.e("DeepLinking: ${deepLinkResult.deepLink}")
}

DeepLinkResult.Status.NOT_FOUND -> {
Timber.e("DeepLinking: NOT_FOUND")
}

DeepLinkResult.Status.ERROR -> {
val error = deepLinkResult.error
Timber.e("DeepLinking: ERROR $error")
}
}
val deepLink = deepLinkResult.deepLink
try {
Timber.e("DeepLinking: $deepLink")
} catch (e: Exception) {
Timber.e("DeepLinking: $e")

}
}
}

companion object {
Expand Down
10 changes: 3 additions & 7 deletions app/src/main/java/com/sopt/smeem/data/ApiPool.kt
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package com.sopt.smeem.data

import com.sopt.smeem.SmeemErrorCode
import com.sopt.smeem.SmeemException
import com.sopt.smeem.domain.common.SmeemErrorCode
import com.sopt.smeem.domain.common.SmeemException
import retrofit2.HttpException

object ApiPool {
@Deprecated("not used")
fun <T> Result<T>.onHttpFailure(action: (SmeemException) -> Unit) {
exceptionOrNull()?.let { exception ->
when (exception) {
Expand All @@ -13,22 +14,18 @@ object ApiPool {
when (exception.code()) {
400 -> throw SmeemException(
errorCode = SmeemErrorCode.SYSTEM_ERROR,
throwable = exception,
)

401 -> throw SmeemException(
errorCode = SmeemErrorCode.UNAUTHORIZED,
throwable = exception,
)

403 -> throw SmeemException(
errorCode = SmeemErrorCode.FORBIDDEN,
throwable = exception,
)

else -> throw SmeemException(
errorCode = SmeemErrorCode.UNKNOWN_ERROR,
throwable = exception,
)
}
} catch (e: SmeemException) {
Expand All @@ -39,7 +36,6 @@ object ApiPool {
else -> action(
SmeemException(
errorCode = SmeemErrorCode.NETWORK_ERROR,
throwable = exception,
logMessage = "서버 통신에 실패했습니다.",
),
)
Expand Down
Loading

0 comments on commit 38c0b1e

Please sign in to comment.