From 34dc5dc9689781253b70dc7ed201880c70d54f4e Mon Sep 17 00:00:00 2001 From: Jaewon Seo <52442547+librarywon@users.noreply.github.com> Date: Tue, 23 Jul 2024 23:39:03 +0900 Subject: [PATCH] =?UTF-8?q?[feature/fix=5Fbuild]=20sentry=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0=20=EB=B0=8F=20retrofit=20proguard=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20(#541)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [feature/fix-build] Remove sentry * [feature/fix-build] fix retrofit proguard conflict --- app/build.gradle.kts | 1 - app/proguard-rules.pro | 6 ++++++ .../teampophory/pophory/feature/home/HomeViewModel.kt | 10 +--------- build.gradle.kts | 1 - core/network/build.gradle.kts | 1 - data/ad/build.gradle.kts | 2 -- data/auth/build.gradle.kts | 2 -- .../data/auth/repository/DefaultAuthRepository.kt | 6 ------ 8 files changed, 7 insertions(+), 22 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 275e71a2..782a894c 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -4,7 +4,6 @@ plugins { pophory("application") pophory("compose") pophory("test") - alias(libs.plugins.sentry) alias(libs.plugins.google.services) alias(libs.plugins.app.distribution) alias(libs.plugins.crashlytics) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index e661d21d..029ccd79 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -60,6 +60,12 @@ # is used. -keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation +# Please add these rules to your existing keep rules in order to suppress warnings. +# This is generated automatically by the Android Gradle plugin. +-dontwarn com.google.auto.service.AutoService +-dontwarn net.ltgt.gradle.incap.IncrementalAnnotationProcessor +-dontwarn net.ltgt.gradle.incap.IncrementalAnnotationProcessorType + ##---------------End: Retrofit ---------- ##---------------Begin: OkHttp ------------- diff --git a/app/src/main/java/com/teampophory/pophory/feature/home/HomeViewModel.kt b/app/src/main/java/com/teampophory/pophory/feature/home/HomeViewModel.kt index f3a20c93..cd6e0ca0 100644 --- a/app/src/main/java/com/teampophory/pophory/feature/home/HomeViewModel.kt +++ b/app/src/main/java/com/teampophory/pophory/feature/home/HomeViewModel.kt @@ -8,8 +8,6 @@ import com.teampophory.pophory.ad.usecase.SetAdConstantUseCase import com.teampophory.pophory.domain.usecase.ConfigureMeUseCase import com.teampophory.pophory.feature.home.store.model.AlbumItem import dagger.hilt.android.lifecycle.HiltViewModel -import io.sentry.Sentry -import io.sentry.protocol.User import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.SharedFlow @@ -36,13 +34,7 @@ class HomeViewModel @Inject constructor( init { viewModelScope.launch { - configureMeUseCase()?.let { - val user = User().apply { - username = it.nickname - name = it.realName - } - Sentry.setUser(user) - } + configureMeUseCase() getAdConstantUseCase("android", BuildConfig.VERSION_NAME).onSuccess { it.forEach { adConstant -> Timber.d("adConstant: $adConstant") diff --git a/build.gradle.kts b/build.gradle.kts index e733caac..4dd4c4e0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -24,7 +24,6 @@ plugins { alias(libs.plugins.ktlint) apply false alias(libs.plugins.ksp) apply false alias(libs.plugins.kotlinx.serialization) apply false - alias(libs.plugins.sentry) apply false alias(libs.plugins.junit5) apply false alias(libs.plugins.google.services) apply false alias(libs.plugins.app.distribution) apply false diff --git a/core/network/build.gradle.kts b/core/network/build.gradle.kts index a876e74b..b1abf127 100644 --- a/core/network/build.gradle.kts +++ b/core/network/build.gradle.kts @@ -1,6 +1,5 @@ plugins { pophory("feature") - alias(libs.plugins.sentry) } android { diff --git a/data/ad/build.gradle.kts b/data/ad/build.gradle.kts index a671510a..3ed34d53 100644 --- a/data/ad/build.gradle.kts +++ b/data/ad/build.gradle.kts @@ -1,6 +1,5 @@ plugins { pophory("feature") - alias(libs.plugins.sentry) } android { @@ -12,5 +11,4 @@ dependencies { implementation(projects.core.common) implementation(projects.core.network) implementation(libs.security) - implementation(libs.sentry) } diff --git a/data/auth/build.gradle.kts b/data/auth/build.gradle.kts index 9b4f2097..6ea68780 100644 --- a/data/auth/build.gradle.kts +++ b/data/auth/build.gradle.kts @@ -1,6 +1,5 @@ plugins { pophory("feature") - alias(libs.plugins.sentry) } android { @@ -13,5 +12,4 @@ dependencies { implementation(projects.core.network) implementation(libs.security) implementation(libs.process.phoenix) - implementation(libs.sentry) } diff --git a/data/auth/src/main/java/com/teampophory/pophory/data/auth/repository/DefaultAuthRepository.kt b/data/auth/src/main/java/com/teampophory/pophory/data/auth/repository/DefaultAuthRepository.kt index 9ed7a360..ce2637d1 100644 --- a/data/auth/src/main/java/com/teampophory/pophory/data/auth/repository/DefaultAuthRepository.kt +++ b/data/auth/src/main/java/com/teampophory/pophory/data/auth/repository/DefaultAuthRepository.kt @@ -8,7 +8,6 @@ import com.teampophory.pophory.data.auth.model.SignUpRequest import com.teampophory.pophory.data.auth.model.SocialType import com.teampophory.pophory.data.auth.service.AuthService import com.teampophory.pophory.network.datastore.PophoryDataStore -import io.sentry.Sentry import javax.inject.Inject class DefaultAuthRepository @Inject constructor( @@ -45,15 +44,10 @@ class DefaultAuthRepository @Inject constructor( override suspend fun withdraw() { service.withdraw("Bearer ${dataStore.accessToken}") dataStore.clear() - expireSentry() } override suspend fun logout() { dataStore.clear() - expireSentry() } - private fun expireSentry() { - Sentry.configureScope { scope -> scope.user = null } - } }