From a9d7efe3bc7e3a504effa879f86cd514fe45d0f3 Mon Sep 17 00:00:00 2001 From: Jokwanhee Date: Fri, 13 Dec 2024 16:44:07 +0900 Subject: [PATCH 01/13] Delete ButterKnife Library --- core/build.gradle.kts | 4 ---- gradle/libs.versions.toml | 3 --- koin/build.gradle.kts | 4 ---- .../java/in/koreatech/koin/ui/error/ErrorActivity.kt | 10 ---------- .../adapter/StoreDetailFlyerFullRecyclerAdapter.kt | 4 ---- .../store/adapter/StoreDetailFlyerRecyclerAdapter.kt | 4 ---- 6 files changed, 29 deletions(-) diff --git a/core/build.gradle.kts b/core/build.gradle.kts index eb415f559..3cde7ebb2 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -64,10 +64,6 @@ dependencies { api(libs.glide) kapt(libs.glide.compiler) - /* Dependency - butterknife */ - api(libs.butterknife) - kapt(libs.butterknife.compiler) - /* Dependency - sticky scroll view */ api(libs.stickyScrollView) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 60a0f21dd..bf971040a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -47,7 +47,6 @@ stickyscrollviewVersion = "1.0.2" strictVersionMatcherPlugin = "1.2.4" composeCompilerVersion = "1.5.10" glideVersion = "4.9.0" -butterknifeVersion = "10.1.0" googleServiceVersion = "4.3.14" composeNavigationVersion = "2.7.7" orbitVersion = "7.0.1" @@ -152,8 +151,6 @@ stickyScrollView = { module = "com.github.amarjain07:StickyScrollView", version. strict-version-matcher-plugin = { module = "com.google.android.gms:strict-version-matcher-plugin", version.ref = "strictVersionMatcherPlugin" } glide = { module = "com.github.bumptech.glide:glide", version.ref = "glideVersion" } glide-compiler = { module = "com.github.bumptech.glide:compiler", version.ref = "glideVersion" } -butterknife = { module = "com.jakewharton:butterknife", version.ref = "butterknifeVersion" } -butterknife-compiler = { module = "com.jakewharton:butterknife-compiler", version.ref = "butterknifeVersion" } viewpager2 = { module = "androidx.viewpager2:viewpager2", version = "1.0.0" } orbit-core = { module = "org.orbit-mvi:orbit-core", version.ref = "orbitVersion" } diff --git a/koin/build.gradle.kts b/koin/build.gradle.kts index b9a2832a1..43508be9a 100644 --- a/koin/build.gradle.kts +++ b/koin/build.gradle.kts @@ -107,10 +107,6 @@ dependencies { implementation(libs.coil) kapt(libs.glide.compiler) - /* Dependency - butterknife api */ - implementation(libs.butterknife) - kapt(libs.butterknife.compiler) - /* Dependency - naver api */ implementation(libs.map.sdk) diff --git a/koin/src/main/java/in/koreatech/koin/ui/error/ErrorActivity.kt b/koin/src/main/java/in/koreatech/koin/ui/error/ErrorActivity.kt index 18c470183..945d93ae3 100644 --- a/koin/src/main/java/in/koreatech/koin/ui/error/ErrorActivity.kt +++ b/koin/src/main/java/in/koreatech/koin/ui/error/ErrorActivity.kt @@ -1,20 +1,10 @@ package `in`.koreatech.koin.ui.error import android.content.Intent -import android.content.pm.PackageManager -import android.net.Uri import android.os.Bundle import android.util.Log import android.view.Gravity -import android.view.View -import android.widget.Button -import android.widget.LinearLayout -import android.widget.TextView -import android.widget.Toast -import androidx.core.content.ContextCompat import androidx.core.view.isVisible -import butterknife.BindView -import butterknife.OnClick import `in`.koreatech.koin.BuildConfig import `in`.koreatech.koin.R import `in`.koreatech.koin.core.activity.ActivityBase diff --git a/koin/src/main/java/in/koreatech/koin/ui/store/adapter/StoreDetailFlyerFullRecyclerAdapter.kt b/koin/src/main/java/in/koreatech/koin/ui/store/adapter/StoreDetailFlyerFullRecyclerAdapter.kt index 7d0f48fd6..8265ddde5 100644 --- a/koin/src/main/java/in/koreatech/koin/ui/store/adapter/StoreDetailFlyerFullRecyclerAdapter.kt +++ b/koin/src/main/java/in/koreatech/koin/ui/store/adapter/StoreDetailFlyerFullRecyclerAdapter.kt @@ -1,6 +1,5 @@ package `in`.koreatech.koin.ui.store.adapter -import android.content.Context import android.view.LayoutInflater import android.view.View import android.view.ViewGroup @@ -8,9 +7,6 @@ import android.widget.ImageView import androidx.recyclerview.widget.DiffUtil import androidx.recyclerview.widget.ListAdapter import androidx.recyclerview.widget.RecyclerView -import butterknife.BindView -import butterknife.ButterKnife -import butterknife.OnItemClick import com.bumptech.glide.Glide import com.bumptech.glide.request.RequestOptions import `in`.koreatech.koin.R diff --git a/koin/src/main/java/in/koreatech/koin/ui/store/adapter/StoreDetailFlyerRecyclerAdapter.kt b/koin/src/main/java/in/koreatech/koin/ui/store/adapter/StoreDetailFlyerRecyclerAdapter.kt index a106e47d4..79f7fee64 100644 --- a/koin/src/main/java/in/koreatech/koin/ui/store/adapter/StoreDetailFlyerRecyclerAdapter.kt +++ b/koin/src/main/java/in/koreatech/koin/ui/store/adapter/StoreDetailFlyerRecyclerAdapter.kt @@ -1,6 +1,5 @@ package `in`.koreatech.koin.ui.store.adapter -import android.content.Context import android.view.LayoutInflater import android.view.View import android.view.ViewGroup @@ -8,9 +7,6 @@ import android.widget.ImageView import androidx.recyclerview.widget.DiffUtil import androidx.recyclerview.widget.ListAdapter import androidx.recyclerview.widget.RecyclerView -import butterknife.BindView -import butterknife.ButterKnife -import butterknife.OnItemClick import com.bumptech.glide.Glide import com.bumptech.glide.request.RequestOptions import `in`.koreatech.koin.R From 4e312d9d0f6e3467d6b12cdb984202a601bc3d09 Mon Sep 17 00:00:00 2001 From: Jokwanhee Date: Fri, 13 Dec 2024 23:39:37 +0900 Subject: [PATCH 02/13] Add KSP and Update Glide 4.9.0 to 4.14.2 --- .../java/AndroidApplicationComposeConventionPlugin.kt | 1 + .../src/main/java/AndroidLibraryConventionPlugin.kt | 1 + build.gradle.kts | 1 + core/build.gradle.kts | 2 +- .../koreatech/koin/core/dialog/ImageZoomableDialog.kt | 10 +++++----- gradle/libs.versions.toml | 6 ++++-- koin/build.gradle.kts | 2 +- koin/src/main/java/in/koreatech/koin/GlideModule.kt | 7 +++++++ .../main/java/in/koreatech/koin/ui/article/HtmlView.kt | 10 +++++----- .../koreatech/koin/ui/dining/adapter/DiningAdapter.kt | 10 +++++----- .../koin/ui/dining/adapter/DiningOriginalAdapter.kt | 10 +++++----- 11 files changed, 36 insertions(+), 24 deletions(-) create mode 100644 koin/src/main/java/in/koreatech/koin/GlideModule.kt diff --git a/build-logic/convention/src/main/java/AndroidApplicationComposeConventionPlugin.kt b/build-logic/convention/src/main/java/AndroidApplicationComposeConventionPlugin.kt index 6771a85ed..b81c31d38 100644 --- a/build-logic/convention/src/main/java/AndroidApplicationComposeConventionPlugin.kt +++ b/build-logic/convention/src/main/java/AndroidApplicationComposeConventionPlugin.kt @@ -12,6 +12,7 @@ internal class AndroidApplicationComposeConventionPlugin : Plugin { apply("org.jetbrains.kotlin.android") apply("kotlin-kapt") apply("kotlin-parcelize") + apply("com.google.devtools.ksp") } extensions.configure { configureAndroidCompose(this) diff --git a/build-logic/convention/src/main/java/AndroidLibraryConventionPlugin.kt b/build-logic/convention/src/main/java/AndroidLibraryConventionPlugin.kt index 4929f5b4c..b83e260d4 100644 --- a/build-logic/convention/src/main/java/AndroidLibraryConventionPlugin.kt +++ b/build-logic/convention/src/main/java/AndroidLibraryConventionPlugin.kt @@ -14,6 +14,7 @@ internal class AndroidLibraryConventionPlugin : Plugin { apply("com.android.library") apply("org.jetbrains.kotlin.kapt") apply("org.jetbrains.kotlin.android") + apply("com.google.devtools.ksp") } extensions.configure { configureAndroidLibrary(this) diff --git a/build.gradle.kts b/build.gradle.kts index 2b10d3902..83fe6cd31 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -34,6 +34,7 @@ plugins { alias(libs.plugins.kotlinx.serialization) apply false alias(libs.plugins.google.service) apply false alias(libs.plugins.androidLibrary) apply false + alias(libs.plugins.ksp) apply false } tasks.register("clean") { diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 3cde7ebb2..93f70dbaa 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -62,7 +62,7 @@ dependencies { /* Dependency - glide */ api(libs.glide) - kapt(libs.glide.compiler) + ksp(libs.glide.ksp) /* Dependency - sticky scroll view */ api(libs.stickyScrollView) diff --git a/core/src/main/java/in/koreatech/koin/core/dialog/ImageZoomableDialog.kt b/core/src/main/java/in/koreatech/koin/core/dialog/ImageZoomableDialog.kt index 5a888173a..10adfc3e1 100644 --- a/core/src/main/java/in/koreatech/koin/core/dialog/ImageZoomableDialog.kt +++ b/core/src/main/java/in/koreatech/koin/core/dialog/ImageZoomableDialog.kt @@ -86,15 +86,15 @@ class ImageZoomableDialog(private val context: Context, private val image: Strin override fun onLoadFailed( e: GlideException?, model: Any?, - target: Target?, + target: Target, isFirstResource: Boolean ): Boolean = false override fun onResourceReady( - resource: Drawable?, - model: Any?, - target: Target?, - dataSource: DataSource?, + resource: Drawable, + model: Any, + target: Target, + dataSource: DataSource, isFirstResource: Boolean ): Boolean { binding.photoView.post { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index bf971040a..f4f7222cd 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -46,7 +46,7 @@ securityCryptoVersion = "1.1.0-alpha03" stickyscrollviewVersion = "1.0.2" strictVersionMatcherPlugin = "1.2.4" composeCompilerVersion = "1.5.10" -glideVersion = "4.9.0" +glideVersion = "4.14.2" googleServiceVersion = "4.3.14" composeNavigationVersion = "2.7.7" orbitVersion = "7.0.1" @@ -69,6 +69,7 @@ timber = "5.0.1" kotlinxCoroutinesTestVersion = "1.9.0" turbineVersion = "1.2.0" kotlinxCollectionsImmutableVersion = "0.3.8" +kspVersion = "1.9.22-1.0.16" [libraries] @@ -150,7 +151,7 @@ rxjava-android = { module = "io.reactivex.rxjava2:rxandroid", version.ref = "rxa stickyScrollView = { module = "com.github.amarjain07:StickyScrollView", version.ref = "stickyscrollviewVersion" } strict-version-matcher-plugin = { module = "com.google.android.gms:strict-version-matcher-plugin", version.ref = "strictVersionMatcherPlugin" } glide = { module = "com.github.bumptech.glide:glide", version.ref = "glideVersion" } -glide-compiler = { module = "com.github.bumptech.glide:compiler", version.ref = "glideVersion" } +glide-ksp = { module = "com.github.bumptech.glide:ksp", version.ref = "glideVersion" } viewpager2 = { module = "androidx.viewpager2:viewpager2", version = "1.0.0" } orbit-core = { module = "org.orbit-mvi:orbit-core", version.ref = "orbitVersion" } @@ -202,6 +203,7 @@ kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", vers hilt = { id = "com.google.dagger.hilt.android", version.ref = "hiltVersion" } androidLibrary = { id = "com.android.library", version.ref = "androidGradleVersion" } google-service = { id = "com.google.gms.google-services", version.ref = "googleServiceVersion" } +ksp = { id = "com.google.devtools.ksp", version.ref = "kspVersion" } koin-application = { id = "in.koreatech.plugin.application", version = "unspecified" } koin-compose = { id = "in.koreatech.plugin.compose", version = "unspecified" } diff --git a/koin/build.gradle.kts b/koin/build.gradle.kts index 43508be9a..2d941bb9d 100644 --- a/koin/build.gradle.kts +++ b/koin/build.gradle.kts @@ -105,7 +105,7 @@ dependencies { /* Dependency - glide & coil */ implementation(libs.glide) implementation(libs.coil) - kapt(libs.glide.compiler) + ksp(libs.glide.ksp) /* Dependency - naver api */ implementation(libs.map.sdk) diff --git a/koin/src/main/java/in/koreatech/koin/GlideModule.kt b/koin/src/main/java/in/koreatech/koin/GlideModule.kt new file mode 100644 index 000000000..c1e35cd9d --- /dev/null +++ b/koin/src/main/java/in/koreatech/koin/GlideModule.kt @@ -0,0 +1,7 @@ +package `in`.koreatech.koin + +import com.bumptech.glide.annotation.GlideModule +import com.bumptech.glide.module.AppGlideModule + +@GlideModule +class GlideModule: AppGlideModule() \ No newline at end of file diff --git a/koin/src/main/java/in/koreatech/koin/ui/article/HtmlView.kt b/koin/src/main/java/in/koreatech/koin/ui/article/HtmlView.kt index 2cd4fb491..7625ec9e9 100644 --- a/koin/src/main/java/in/koreatech/koin/ui/article/HtmlView.kt +++ b/koin/src/main/java/in/koreatech/koin/ui/article/HtmlView.kt @@ -130,17 +130,17 @@ class HtmlView @JvmOverloads constructor( override fun onLoadFailed( e: GlideException?, model: Any?, - target: com.bumptech.glide.request.target.Target?, + target: com.bumptech.glide.request.target.Target, isFirstResource: Boolean ): Boolean { return false } override fun onResourceReady( - resource: Drawable?, - model: Any?, - target: com.bumptech.glide.request.target.Target?, - dataSource: DataSource?, + resource: Drawable, + model: Any, + target: com.bumptech.glide.request.target.Target, + dataSource: DataSource, isFirstResource: Boolean ): Boolean { val dialog = ImageZoomableDialog(context, model as String) diff --git a/koin/src/main/java/in/koreatech/koin/ui/dining/adapter/DiningAdapter.kt b/koin/src/main/java/in/koreatech/koin/ui/dining/adapter/DiningAdapter.kt index cf594393a..418261826 100644 --- a/koin/src/main/java/in/koreatech/koin/ui/dining/adapter/DiningAdapter.kt +++ b/koin/src/main/java/in/koreatech/koin/ui/dining/adapter/DiningAdapter.kt @@ -72,17 +72,17 @@ class DiningAdapter( override fun onLoadFailed( e: GlideException?, model: Any?, - target: Target?, + target: Target, isFirstResource: Boolean ): Boolean { return false } override fun onResourceReady( - resource: Drawable?, - model: Any?, - target: Target?, - dataSource: DataSource?, + resource: Drawable, + model: Any, + target: Target, + dataSource: DataSource, isFirstResource: Boolean ): Boolean { binding.lottieImageLoading.pauseAnimation() diff --git a/koin/src/main/java/in/koreatech/koin/ui/dining/adapter/DiningOriginalAdapter.kt b/koin/src/main/java/in/koreatech/koin/ui/dining/adapter/DiningOriginalAdapter.kt index d03b0e0b6..2a24a8e2b 100644 --- a/koin/src/main/java/in/koreatech/koin/ui/dining/adapter/DiningOriginalAdapter.kt +++ b/koin/src/main/java/in/koreatech/koin/ui/dining/adapter/DiningOriginalAdapter.kt @@ -73,17 +73,17 @@ class DiningOriginalAdapter( override fun onLoadFailed( e: GlideException?, model: Any?, - target: Target?, + target: Target, isFirstResource: Boolean ): Boolean { return false } override fun onResourceReady( - resource: Drawable?, - model: Any?, - target: Target?, - dataSource: DataSource?, + resource: Drawable, + model: Any, + target: Target, + dataSource: DataSource, isFirstResource: Boolean ): Boolean { binding.lottieImageLoading.pauseAnimation() From e3f008a9aa61a1c91cb8f60b7587e2eb7ce53bf6 Mon Sep 17 00:00:00 2001 From: Jokwanhee Date: Sat, 14 Dec 2024 00:19:03 +0900 Subject: [PATCH 03/13] Change Hilt KAPT to KSP plugin --- .../main/java/AndroidApplicationComposeConventionPlugin.kt | 1 - .../src/main/java/AndroidApplicationHiltConventionPlugin.kt | 3 ++- .../src/main/java/AndroidLibraryConventionPlugin.kt | 1 - core/onboarding/build.gradle.kts | 4 +--- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/build-logic/convention/src/main/java/AndroidApplicationComposeConventionPlugin.kt b/build-logic/convention/src/main/java/AndroidApplicationComposeConventionPlugin.kt index b81c31d38..bbae67b46 100644 --- a/build-logic/convention/src/main/java/AndroidApplicationComposeConventionPlugin.kt +++ b/build-logic/convention/src/main/java/AndroidApplicationComposeConventionPlugin.kt @@ -10,7 +10,6 @@ internal class AndroidApplicationComposeConventionPlugin : Plugin { with(pluginManager) { apply("com.android.application") apply("org.jetbrains.kotlin.android") - apply("kotlin-kapt") apply("kotlin-parcelize") apply("com.google.devtools.ksp") } diff --git a/build-logic/convention/src/main/java/AndroidApplicationHiltConventionPlugin.kt b/build-logic/convention/src/main/java/AndroidApplicationHiltConventionPlugin.kt index 59e173e7c..4ae15591f 100644 --- a/build-logic/convention/src/main/java/AndroidApplicationHiltConventionPlugin.kt +++ b/build-logic/convention/src/main/java/AndroidApplicationHiltConventionPlugin.kt @@ -1,5 +1,6 @@ import `in`.koreatech.convention.implementation import `in`.koreatech.convention.kapt +import `in`.koreatech.convention.ksp import `in`.koreatech.convention.libs import org.gradle.api.Plugin import org.gradle.api.Project @@ -13,7 +14,7 @@ internal class AndroidApplicationHiltConventionPlugin : Plugin { } dependencies { implementation(libs.findBundle("hilt").get()) - kapt(libs.findLibrary("hilt-compiler").get()) + ksp(libs.findLibrary("hilt-compiler").get()) } } } diff --git a/build-logic/convention/src/main/java/AndroidLibraryConventionPlugin.kt b/build-logic/convention/src/main/java/AndroidLibraryConventionPlugin.kt index b83e260d4..03fcdc171 100644 --- a/build-logic/convention/src/main/java/AndroidLibraryConventionPlugin.kt +++ b/build-logic/convention/src/main/java/AndroidLibraryConventionPlugin.kt @@ -12,7 +12,6 @@ internal class AndroidLibraryConventionPlugin : Plugin { with(target) { with(pluginManager) { apply("com.android.library") - apply("org.jetbrains.kotlin.kapt") apply("org.jetbrains.kotlin.android") apply("com.google.devtools.ksp") } diff --git a/core/onboarding/build.gradle.kts b/core/onboarding/build.gradle.kts index b2b437109..f03ea95a4 100644 --- a/core/onboarding/build.gradle.kts +++ b/core/onboarding/build.gradle.kts @@ -6,9 +6,7 @@ plugins { android { namespace = "in.koreatech.koin.core.onboarding" } -kapt { - correctErrorTypes = true -} + dependencies { implementation(project(":domain")) From 8a454cf15068ed08781f7760ccc12fcc701d0866 Mon Sep 17 00:00:00 2001 From: wateralsie Date: Fri, 29 Nov 2024 13:57:51 +0900 Subject: [PATCH 04/13] =?UTF-8?q?fix:=20=EA=B3=B5=EC=A7=80=EC=82=AC?= =?UTF-8?q?=ED=95=AD=20=EB=B0=B0=EB=84=88=20=EC=B5=9C=EC=86=8C=20height=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95,=20=EC=A0=95=EB=A0=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/res/layout/main_card_article.xml | 46 +++++++++++-------- .../res/layout/main_card_article_noti.xml | 33 +++++++------ 2 files changed, 46 insertions(+), 33 deletions(-) diff --git a/koin/src/main/res/layout/main_card_article.xml b/koin/src/main/res/layout/main_card_article.xml index 95c0a77be..0440a79d3 100644 --- a/koin/src/main/res/layout/main_card_article.xml +++ b/koin/src/main/res/layout/main_card_article.xml @@ -4,14 +4,14 @@ xmlns:tools="http://schemas.android.com/tools"> + android:layout_height="match_parent" + android:layout_marginHorizontal="20dp"> + android:layout_height="match_parent" + android:minHeight="95dp" + android:paddingHorizontal="16dp" + android:paddingVertical="16dp"> + android:textStyle="bold" /> + + + app:layout_constraintStart_toEndOf="@id/ic_hot_now" + app:layout_constraintTop_toTopOf="@id/ic_hot_now" /> diff --git a/koin/src/main/res/layout/main_card_article_noti.xml b/koin/src/main/res/layout/main_card_article_noti.xml index 4d69c6d9a..4fb891107 100644 --- a/koin/src/main/res/layout/main_card_article_noti.xml +++ b/koin/src/main/res/layout/main_card_article_noti.xml @@ -11,7 +11,7 @@ + android:paddingVertical="11.5dp"> + android:textColor="@color/sub_sub600" /> + + From 19f574be60ba0e05ec0144cff726f325cbf52558 Mon Sep 17 00:00:00 2001 From: wateralsie Date: Tue, 3 Dec 2024 17:15:08 +0900 Subject: [PATCH 05/13] =?UTF-8?q?fix:=20=EB=A1=9C=EA=B9=85=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../koreatech/koin/core/constant/AnalyticsConstant.kt | 1 + .../in/koreatech/koin/ui/main/activity/MainActivity.kt | 6 +++++- .../koin/ui/main/viewmodel/MainActivityViewModel.kt | 10 ++++++---- koin/src/main/res/values/strings.xml | 1 + 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/in/koreatech/koin/core/constant/AnalyticsConstant.kt b/core/src/main/java/in/koreatech/koin/core/constant/AnalyticsConstant.kt index 544706cd7..3417b6336 100644 --- a/core/src/main/java/in/koreatech/koin/core/constant/AnalyticsConstant.kt +++ b/core/src/main/java/in/koreatech/koin/core/constant/AnalyticsConstant.kt @@ -99,6 +99,7 @@ object AnalyticsConstant { const val CAMPUS_DINING_1 = "CAMPUS_dining_1" const val CAMPUS_NOTICE_1 = "CAMPUS_notice_1" + const val APP_MAIN_NOTICE_DETAIL = "app_main_notice_detail" const val POPULAR_NOTICE_BANNER = "popular_notice_banner" const val TO_MANAGE_KEYWORD = "to_manage_keyword" diff --git a/koin/src/main/java/in/koreatech/koin/ui/main/activity/MainActivity.kt b/koin/src/main/java/in/koreatech/koin/ui/main/activity/MainActivity.kt index 2adb2339e..05d3f89c6 100644 --- a/koin/src/main/java/in/koreatech/koin/ui/main/activity/MainActivity.kt +++ b/koin/src/main/java/in/koreatech/koin/ui/main/activity/MainActivity.kt @@ -3,7 +3,6 @@ package `in`.koreatech.koin.ui.main.activity import android.content.Intent import android.net.Uri import android.os.Bundle -import android.util.Log import android.view.View import androidx.activity.viewModels import androidx.compose.foundation.layout.fillMaxWidth @@ -242,6 +241,11 @@ class MainActivity : KoinNavigationDrawerTimeActivity() { TabLayoutMediator(tabHotArticle, viewPagerHotArticle) { _, _ -> }.attach() textSeeMoreArticle.setOnClickListener { + EventLogger.logClickEvent( + EventAction.CAMPUS, + AnalyticsConstant.Label.APP_MAIN_NOTICE_DETAIL, + getString(R.string.article_more) + ) startActivity(Intent(this@MainActivity, ArticleActivity::class.java)) } diff --git a/koin/src/main/java/in/koreatech/koin/ui/main/viewmodel/MainActivityViewModel.kt b/koin/src/main/java/in/koreatech/koin/ui/main/viewmodel/MainActivityViewModel.kt index 8721ac408..bcec0dc84 100644 --- a/koin/src/main/java/in/koreatech/koin/ui/main/viewmodel/MainActivityViewModel.kt +++ b/koin/src/main/java/in/koreatech/koin/ui/main/viewmodel/MainActivityViewModel.kt @@ -96,16 +96,18 @@ class MainActivityViewModel @Inject constructor( emit(it) when (it) { ExperimentGroup.MAIN_DINING_NEW -> { - EventLogger.logClickEvent( - EventAction.CAMPUS, + EventLogger.logCustomEvent( + "AB_TEST", + "a/b test 로깅(식단 메인 진입점)", AnalyticsConstant.Label.CAMPUS_DINING_1, "더보기O" ) } ExperimentGroup.MAIN_DINING_ORIGINAL -> { - EventLogger.logClickEvent( - EventAction.CAMPUS, + EventLogger.logCustomEvent( + "AB_TEST", + "a/b test 로깅(식단 메인 진입점)", AnalyticsConstant.Label.CAMPUS_DINING_1, "더보기X" ) diff --git a/koin/src/main/res/values/strings.xml b/koin/src/main/res/values/strings.xml index 786aef44c..9505d209b 100644 --- a/koin/src/main/res/values/strings.xml +++ b/koin/src/main/res/values/strings.xml @@ -557,6 +557,7 @@ 공지사항 공지글 검색 키워드 관리 + 더보기 자유게시판 취업게시판 익명게시판 From feb42a9c5d1520f0bbf31c2453e754be0d9ecc7e Mon Sep 17 00:00:00 2001 From: Jokwanhee Date: Sun, 15 Dec 2024 23:23:47 +0900 Subject: [PATCH 06/13] Delete irshulx library and change theme, drawable --- koin/build.gradle.kts | 2 -- koin/src/main/AndroidManifest.xml | 2 +- koin/src/main/res/drawable/baseline_arrow_back_24.xml | 5 +++++ koin/src/main/res/layout/activity_dining_notice.xml | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 koin/src/main/res/drawable/baseline_arrow_back_24.xml diff --git a/koin/build.gradle.kts b/koin/build.gradle.kts index 2d941bb9d..07b03d2fd 100644 --- a/koin/build.gradle.kts +++ b/koin/build.gradle.kts @@ -115,8 +115,6 @@ dependencies { implementation(libs.inApp.update.ktx) implementation(libs.feature.delivery.ktx) - // https://github.com/irshuLx/Android-WYSIWYG-Editor - implementation(libs.laser.native.editor) implementation(libs.colorpicker) implementation(libs.photoview) diff --git a/koin/src/main/AndroidManifest.xml b/koin/src/main/AndroidManifest.xml index de8e3e295..fb4a0ea52 100644 --- a/koin/src/main/AndroidManifest.xml +++ b/koin/src/main/AndroidManifest.xml @@ -29,7 +29,7 @@ android:requestLegacyExternalStorage="true" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" - android:theme="@style/AppTheme.NoActionBar" + android:theme="@style/KAPTheme.NoActionBar" android:usesCleartextTraffic="true" tools:replace="icon,label"> diff --git a/koin/src/main/res/drawable/baseline_arrow_back_24.xml b/koin/src/main/res/drawable/baseline_arrow_back_24.xml new file mode 100644 index 000000000..075e95dc8 --- /dev/null +++ b/koin/src/main/res/drawable/baseline_arrow_back_24.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/koin/src/main/res/layout/activity_dining_notice.xml b/koin/src/main/res/layout/activity_dining_notice.xml index 3b528adb9..9fdf70ecb 100644 --- a/koin/src/main/res/layout/activity_dining_notice.xml +++ b/koin/src/main/res/layout/activity_dining_notice.xml @@ -19,7 +19,7 @@ android:layout_height="0dp" android:layout_marginStart="16dp" android:padding="8dp" - android:src="@drawable/ic_arrow_back_black_24dp" + android:src="@drawable/ic_arrow_back_black_24" app:layout_constraintBottom_toBottomOf="@id/tv_dining_notice_topbar" app:layout_constraintDimensionRatio="1" app:layout_constraintStart_toStartOf="parent" From 97ceb65093ea21941ba9a19cd51d2ca9fa9a6b43 Mon Sep 17 00:00:00 2001 From: Jokwanhee Date: Sun, 15 Dec 2024 23:24:48 +0900 Subject: [PATCH 07/13] Chnage api to implementation (glide) --- core/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 93f70dbaa..f6eecff71 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -61,7 +61,7 @@ dependencies { debugImplementation(libs.leakcanary.android) /* Dependency - glide */ - api(libs.glide) + implementation(libs.glide) ksp(libs.glide.ksp) /* Dependency - sticky scroll view */ From acf9252c103b8d0676dab68beab23189d186f6ce Mon Sep 17 00:00:00 2001 From: wateralsie Date: Sun, 15 Dec 2024 16:49:33 +0900 Subject: [PATCH 08/13] =?UTF-8?q?fix:=20ab=ED=85=8C=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=ED=86=A0=ED=81=B0=20=EB=B0=9C=EA=B8=89=20=ED=9B=84=20=EC=8B=A4?= =?UTF-8?q?=ED=97=98=EA=B5=B0=20=EC=A1=B0=ED=9A=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../koin/data/api/auth/UserAuthApi.kt | 4 +++ .../data/repository/UserRepositoryImpl.kt | 6 +++++ .../data/response/user/ABTestTokenResponse.kt | 7 ++++++ .../source/remote/UserRemoteDataSource.kt | 5 ++++ .../koin/domain/repository/UserRepository.kt | 1 + .../koin/domain/usecase/user/ABTestUseCase.kt | 25 ++++++++++--------- .../ui/dining/viewmodel/DiningViewModel.kt | 2 -- .../main/viewmodel/MainActivityViewModel.kt | 4 --- 8 files changed, 36 insertions(+), 18 deletions(-) create mode 100644 data/src/main/java/in/koreatech/koin/data/response/user/ABTestTokenResponse.kt diff --git a/data/src/main/java/in/koreatech/koin/data/api/auth/UserAuthApi.kt b/data/src/main/java/in/koreatech/koin/data/api/auth/UserAuthApi.kt index 81bc3578c..7f99b9ba6 100644 --- a/data/src/main/java/in/koreatech/koin/data/api/auth/UserAuthApi.kt +++ b/data/src/main/java/in/koreatech/koin/data/api/auth/UserAuthApi.kt @@ -10,6 +10,7 @@ import `in`.koreatech.koin.data.request.user.UserRequest import `in`.koreatech.koin.data.response.notification.NotificationPermissionInfoResponse import `in`.koreatech.koin.data.response.store.StoreReviewResponse import `in`.koreatech.koin.data.response.user.ABTestResponse +import `in`.koreatech.koin.data.response.user.ABTestTokenResponse import `in`.koreatech.koin.data.response.user.UserInfoEditResponse import `in`.koreatech.koin.data.response.user.UserResponse import retrofit2.Response @@ -90,6 +91,9 @@ interface UserAuthApi { @GET(URLConstant.OWNER.OWNER) suspend fun getOwnerTokenIsValid() + @POST("abtest/assign/token") + suspend fun updateABTestToken(): ABTestTokenResponse + @POST("abtest/assign") suspend fun postABTestAssign(@Body abTestRequest: ABTestRequest): ABTestResponse diff --git a/data/src/main/java/in/koreatech/koin/data/repository/UserRepositoryImpl.kt b/data/src/main/java/in/koreatech/koin/data/repository/UserRepositoryImpl.kt index c6094fce6..6a696135c 100644 --- a/data/src/main/java/in/koreatech/koin/data/repository/UserRepositoryImpl.kt +++ b/data/src/main/java/in/koreatech/koin/data/repository/UserRepositoryImpl.kt @@ -120,6 +120,12 @@ class UserRepositoryImpl @Inject constructor( userRemoteDataSource.verifyPassword(PasswordRequest(hashedPassword)) } + override suspend fun updateABTestToken() { + userRemoteDataSource.updateABTestToken().accessHistoryId.also { + tokenLocalDataSource.saveAccessHistoryId(it) + } + } + override suspend fun postABTestAssign(title: String): ABTest { userRemoteDataSource.postABTestAssign(ABTestRequest(title)).let { return ABTest(it.variableName, it.accessHistoryId) diff --git a/data/src/main/java/in/koreatech/koin/data/response/user/ABTestTokenResponse.kt b/data/src/main/java/in/koreatech/koin/data/response/user/ABTestTokenResponse.kt new file mode 100644 index 000000000..b8c4e5be3 --- /dev/null +++ b/data/src/main/java/in/koreatech/koin/data/response/user/ABTestTokenResponse.kt @@ -0,0 +1,7 @@ +package `in`.koreatech.koin.data.response.user + +import com.google.gson.annotations.SerializedName + +data class ABTestTokenResponse( + @SerializedName("accessHistoryId") val accessHistoryId: String +) diff --git a/data/src/main/java/in/koreatech/koin/data/source/remote/UserRemoteDataSource.kt b/data/src/main/java/in/koreatech/koin/data/source/remote/UserRemoteDataSource.kt index 8ebd69fea..31e4723cb 100644 --- a/data/src/main/java/in/koreatech/koin/data/source/remote/UserRemoteDataSource.kt +++ b/data/src/main/java/in/koreatech/koin/data/source/remote/UserRemoteDataSource.kt @@ -76,6 +76,11 @@ class UserRemoteDataSource( suspend fun verifyPassword(passwordRequest: PasswordRequest) { userAuthApi.checkPassword(passwordRequest) } + + suspend fun updateABTestToken(): ABTestTokenResponse { + return userAuthApi.updateABTestToken() + } + suspend fun postABTestAssign(abTestRequest: ABTestRequest): ABTestResponse { return userAuthApi.postABTestAssign(abTestRequest) } diff --git a/domain/src/main/java/in/koreatech/koin/domain/repository/UserRepository.kt b/domain/src/main/java/in/koreatech/koin/domain/repository/UserRepository.kt index decad4ed3..35a02fba9 100644 --- a/domain/src/main/java/in/koreatech/koin/domain/repository/UserRepository.kt +++ b/domain/src/main/java/in/koreatech/koin/domain/repository/UserRepository.kt @@ -27,5 +27,6 @@ interface UserRepository { suspend fun deleteDeviceToken() suspend fun verifyPassword(hashedPassword: String) suspend fun updateUserPassword(user: User, hashedPassword: String) + suspend fun updateABTestToken() suspend fun postABTestAssign(title: String) : ABTest } \ No newline at end of file diff --git a/domain/src/main/java/in/koreatech/koin/domain/usecase/user/ABTestUseCase.kt b/domain/src/main/java/in/koreatech/koin/domain/usecase/user/ABTestUseCase.kt index 358abfc31..d256f8d88 100644 --- a/domain/src/main/java/in/koreatech/koin/domain/usecase/user/ABTestUseCase.kt +++ b/domain/src/main/java/in/koreatech/koin/domain/usecase/user/ABTestUseCase.kt @@ -1,24 +1,25 @@ package `in`.koreatech.koin.domain.usecase.user -import `in`.koreatech.koin.domain.error.user.UserErrorHandler -import `in`.koreatech.koin.domain.model.error.ErrorHandler import `in`.koreatech.koin.domain.repository.TokenRepository import `in`.koreatech.koin.domain.repository.UserRepository +import kotlinx.coroutines.sync.Mutex +import kotlinx.coroutines.sync.withLock import javax.inject.Inject class ABTestUseCase @Inject constructor( private val userRepository: UserRepository, - private val tokenRepository: TokenRepository, - private val userErrorHandler: UserErrorHandler + private val tokenRepository: TokenRepository ) { - suspend operator fun invoke(title: String): Pair { - return try { - val accessHistory = userRepository.postABTestAssign(title) - val accessHistoryId = accessHistory.accessHistoryId - tokenRepository.saveAccessHistoryId(accessHistoryId) - accessHistory.variableName to null - } catch (t: Throwable) { - null to userErrorHandler.handleVerifyUserPasswordError(t) + private val mutex = Mutex() + + suspend operator fun invoke(title: String): Result { + return runCatching { + mutex.withLock { + if (tokenRepository.getAccessHistoryId() == null) { + userRepository.updateABTestToken() + } + } + userRepository.postABTestAssign(title).variableName } } } \ No newline at end of file diff --git a/koin/src/main/java/in/koreatech/koin/ui/dining/viewmodel/DiningViewModel.kt b/koin/src/main/java/in/koreatech/koin/ui/dining/viewmodel/DiningViewModel.kt index 05543bc2c..b38fd6222 100644 --- a/koin/src/main/java/in/koreatech/koin/ui/dining/viewmodel/DiningViewModel.kt +++ b/koin/src/main/java/in/koreatech/koin/ui/dining/viewmodel/DiningViewModel.kt @@ -11,8 +11,6 @@ import `in`.koreatech.koin.domain.usecase.user.ABTestUseCase import `in`.koreatech.koin.domain.usecase.user.GetUserStatusUseCase import `in`.koreatech.koin.domain.util.DiningUtil import `in`.koreatech.koin.domain.util.TimeUtil -import `in`.koreatech.koin.domain.util.onFailure -import `in`.koreatech.koin.domain.util.onSuccess import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.SharingStarted import kotlinx.coroutines.flow.StateFlow diff --git a/koin/src/main/java/in/koreatech/koin/ui/main/viewmodel/MainActivityViewModel.kt b/koin/src/main/java/in/koreatech/koin/ui/main/viewmodel/MainActivityViewModel.kt index bcec0dc84..143ef83f2 100644 --- a/koin/src/main/java/in/koreatech/koin/ui/main/viewmodel/MainActivityViewModel.kt +++ b/koin/src/main/java/in/koreatech/koin/ui/main/viewmodel/MainActivityViewModel.kt @@ -1,6 +1,5 @@ package `in`.koreatech.koin.ui.main.viewmodel -import android.util.Log import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData import androidx.lifecycle.asFlow @@ -9,7 +8,6 @@ import androidx.lifecycle.viewModelScope import dagger.hilt.android.lifecycle.HiltViewModel import `in`.koreatech.koin.core.abtest.Experiment import `in`.koreatech.koin.core.abtest.ExperimentGroup -import `in`.koreatech.koin.core.analytics.EventAction import `in`.koreatech.koin.core.analytics.EventLogger import `in`.koreatech.koin.core.constant.AnalyticsConstant import `in`.koreatech.koin.core.viewmodel.BaseViewModel @@ -26,8 +24,6 @@ import `in`.koreatech.koin.domain.usecase.store.GetStoreCategoriesUseCase import `in`.koreatech.koin.domain.usecase.user.ABTestUseCase import `in`.koreatech.koin.domain.util.DiningUtil import `in`.koreatech.koin.domain.util.TimeUtil -import `in`.koreatech.koin.domain.util.onFailure -import `in`.koreatech.koin.domain.util.onSuccess import `in`.koreatech.koin.ui.main.state.ArticleMainState import `in`.koreatech.koin.ui.main.state.toContent import `in`.koreatech.koin.ui.main.state.toNoti From 1882373d14437804a2b30167aa768304544166b9 Mon Sep 17 00:00:00 2001 From: Jokwanhee Date: Mon, 16 Dec 2024 15:08:30 +0900 Subject: [PATCH 09/13] Delete kapt import --- .../src/main/java/AndroidApplicationHiltConventionPlugin.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/build-logic/convention/src/main/java/AndroidApplicationHiltConventionPlugin.kt b/build-logic/convention/src/main/java/AndroidApplicationHiltConventionPlugin.kt index 4ae15591f..334cd7864 100644 --- a/build-logic/convention/src/main/java/AndroidApplicationHiltConventionPlugin.kt +++ b/build-logic/convention/src/main/java/AndroidApplicationHiltConventionPlugin.kt @@ -1,5 +1,4 @@ import `in`.koreatech.convention.implementation -import `in`.koreatech.convention.kapt import `in`.koreatech.convention.ksp import `in`.koreatech.convention.libs import org.gradle.api.Plugin From 44c5e23c5ddeaa9a9dec6b9c18083f805928d9c0 Mon Sep 17 00:00:00 2001 From: Jokwanhee Date: Mon, 16 Dec 2024 20:15:01 +0900 Subject: [PATCH 10/13] Change java 11 to 17 --- .github/workflows/weekly_cd.yml | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/weekly_cd.yml b/.github/workflows/weekly_cd.yml index 6855521a0..fba167887 100644 --- a/.github/workflows/weekly_cd.yml +++ b/.github/workflows/weekly_cd.yml @@ -1,8 +1,10 @@ name: Weekly CD on: - schedule: - - cron: '0 15 * * 0' + push: + branches: [ "fix/weekly_cd" ] +# schedule: +# - cron: '0 15 * * 0' jobs: deploy: @@ -12,11 +14,11 @@ jobs: with: ref: 'develop' - - name: set up JDK 11 + - name: set up JDK 17 uses: actions/setup-java@v4 with: distribution: 'zulu' - java-version: '11' + java-version: '17' - name: Make gradlew executable run: chmod +x ./gradlew @@ -93,12 +95,12 @@ jobs: --release-notes "${{ steps.date.outputs.time }} - develop" \ --debug - - name: Upload to Slack - uses: 8398a7/action-slack@v3 - with: - status: ${{ job.status }} - author_name: Android Weekly Dev Deploy - fields: repo,message,commit,author,action,eventName,ref,workflow,job,took - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - if: always() +# - name: Upload to Slack +# uses: 8398a7/action-slack@v3 +# with: +# status: ${{ job.status }} +# author_name: Android Weekly Dev Deploy +# fields: repo,message,commit,author,action,eventName,ref,workflow,job,took +# env: +# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} +# if: always() From 4d477d7c3d61021901e5e30ff2837f6c8927dd5c Mon Sep 17 00:00:00 2001 From: Jokwanhee Date: Mon, 16 Dec 2024 20:23:42 +0900 Subject: [PATCH 11/13] Delete cd push test --- .github/workflows/weekly_cd.yml | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/weekly_cd.yml b/.github/workflows/weekly_cd.yml index fba167887..a05e6788c 100644 --- a/.github/workflows/weekly_cd.yml +++ b/.github/workflows/weekly_cd.yml @@ -1,10 +1,8 @@ name: Weekly CD on: - push: - branches: [ "fix/weekly_cd" ] -# schedule: -# - cron: '0 15 * * 0' + schedule: + - cron: '0 15 * * 0' jobs: deploy: @@ -95,12 +93,12 @@ jobs: --release-notes "${{ steps.date.outputs.time }} - develop" \ --debug -# - name: Upload to Slack -# uses: 8398a7/action-slack@v3 -# with: -# status: ${{ job.status }} -# author_name: Android Weekly Dev Deploy -# fields: repo,message,commit,author,action,eventName,ref,workflow,job,took -# env: -# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} -# if: always() + - name: Upload to Slack + uses: 8398a7/action-slack@v3 + with: + status: ${{ job.status }} + author_name: Android Weekly Dev Deploy + fields: repo,message,commit,author,action,eventName,ref,workflow,job,took + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + if: always() From 30fa3be38280fa542e6cf77011d4b30845b3e37f Mon Sep 17 00:00:00 2001 From: wateralsie Date: Wed, 18 Dec 2024 20:46:13 +0900 Subject: [PATCH 12/13] =?UTF-8?q?refactor:=20ab=ED=85=8C=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=20=EB=A1=9C=EA=B9=85=20=ED=95=A8=EC=88=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../koin/core/analytics/EventLogger.kt | 11 ++++ .../koin/core/constant/AnalyticsConstant.kt | 4 +- .../koin/ui/main/activity/MainActivity.kt | 63 ++++--------------- .../main/viewmodel/MainActivityViewModel.kt | 12 ++-- .../ui/store/activity/StoreDetailActivity.kt | 21 +++---- 5 files changed, 37 insertions(+), 74 deletions(-) diff --git a/core/src/main/java/in/koreatech/koin/core/analytics/EventLogger.kt b/core/src/main/java/in/koreatech/koin/core/analytics/EventLogger.kt index 454e51d07..1df10adda 100644 --- a/core/src/main/java/in/koreatech/koin/core/analytics/EventLogger.kt +++ b/core/src/main/java/in/koreatech/koin/core/analytics/EventLogger.kt @@ -59,6 +59,16 @@ object EventLogger { logEvent(action, EventCategory.NOTIFICATION, label, value, *extras) } + /** + * AB테스트 이벤트 로깅 + * @param category: 이벤트 종류 + * @param label: 이벤트 소분류 + * @param value: 이벤트 값 + */ + fun logABTestEvent(category: String, label: String, value: String) { + logCustomEvent(EventAction.ABTEST.value, category, label, value) + } + /** * @param action: 커스텀 이벤트 발생(EventAction 이외에 action) * @param category: 커스텀 이벤트 종류(EventCategory 이외에 category) @@ -118,6 +128,7 @@ enum class EventAction(val value: String) { BUSINESS("BUSINESS"), CAMPUS("CAMPUS"), USER("USER"), + ABTEST("AB_TEST"), } enum class EventCategory(val value: String) { diff --git a/core/src/main/java/in/koreatech/koin/core/constant/AnalyticsConstant.kt b/core/src/main/java/in/koreatech/koin/core/constant/AnalyticsConstant.kt index 3417b6336..3ed94f8e3 100644 --- a/core/src/main/java/in/koreatech/koin/core/constant/AnalyticsConstant.kt +++ b/core/src/main/java/in/koreatech/koin/core/constant/AnalyticsConstant.kt @@ -103,8 +103,8 @@ object AnalyticsConstant { const val POPULAR_NOTICE_BANNER = "popular_notice_banner" const val TO_MANAGE_KEYWORD = "to_manage_keyword" - const val BUSINESS_CALL_NUMBER = " BUSINESS_call_1" - const val BUSINESS_CALL_FLOATING = "BUSINESS_call_1" + const val BUSINESS_BENEFIT_1 = "BUSINESS_benefit_1" + const val BUSINESS_CALL_1 = "BUSINESS_call_1" } const val PREVIOUS_PAGE = "previous_page" diff --git a/koin/src/main/java/in/koreatech/koin/ui/main/activity/MainActivity.kt b/koin/src/main/java/in/koreatech/koin/ui/main/activity/MainActivity.kt index 05d3f89c6..5c4e36787 100644 --- a/koin/src/main/java/in/koreatech/koin/ui/main/activity/MainActivity.kt +++ b/koin/src/main/java/in/koreatech/koin/ui/main/activity/MainActivity.kt @@ -327,33 +327,30 @@ class MainActivity : KoinNavigationDrawerTimeActivity() { observeLiveData(variableName) { when (viewModel.variableName.value) { ExperimentGroup.A -> { - EventLogger.logCustomEvent( - action = "AB_TEST", - category = "a/b test 로깅(3차 스프린트, 혜택페이지)", - label = "BUSINESS_benefit_1", - value = "혜택X" + EventLogger.logABTestEvent( + "a/b test 로깅(3차 스프린트, 혜택페이지)", + AnalyticsConstant.Label.BUSINESS_BENEFIT_1, + "혜택X" ) binding.storeButtonLayout.visibility = View.GONE binding.recyclerViewStoreCategory.visibility = View.VISIBLE } ExperimentGroup.B -> { - EventLogger.logCustomEvent( - action = "AB_TEST", - category = "a/b test 로깅(3차 스프린트, 혜택페이지)", - label = "BUSINESS_benefit_1", - value = "혜택O" + EventLogger.logABTestEvent( + "a/b test 로깅(3차 스프린트, 혜택페이지)", + AnalyticsConstant.Label.BUSINESS_BENEFIT_1, + "혜택O" ) binding.storeButtonLayout.visibility = View.VISIBLE binding.recyclerViewStoreCategory.visibility = View.GONE } else -> { - EventLogger.logCustomEvent( - action = "AB_TEST", - category = "a/b test 로깅(3차 스프린트, 혜택페이지)", - label = "BUSINESS_benefit_1", - value = "혜택X" + EventLogger.logABTestEvent( + "a/b test 로깅(3차 스프린트, 혜택페이지)", + AnalyticsConstant.Label.BUSINESS_BENEFIT_1, + "혜택X" ) binding.storeButtonLayout.visibility = View.GONE binding.recyclerViewStoreCategory.visibility = View.VISIBLE @@ -380,42 +377,6 @@ class MainActivity : KoinNavigationDrawerTimeActivity() { } binding.recyclerViewStoreCategory.visibility = View.GONE binding.storeButtonLayout.visibility = View.VISIBLE - observeLiveData(variableName) { - when (viewModel.variableName.value) { - ExperimentGroup.A -> { - EventLogger.logCustomEvent( - action = "AB_TEST", - category = "a/b test 로깅(3차 스프린트, 혜택페이지)", - label = "BUSINESS_benefit_1", - value = "혜택X" - ) - binding.storeButtonLayout.visibility = View.GONE - binding.recyclerViewStoreCategory.visibility = View.VISIBLE - } - - ExperimentGroup.B -> { - EventLogger.logCustomEvent( - action = "AB_TEST", - category = "a/b test 로깅(3차 스프린트, 혜택페이지)", - label = "BUSINESS_benefit_1", - value = "혜택O" - ) - binding.storeButtonLayout.visibility = View.VISIBLE - binding.recyclerViewStoreCategory.visibility = View.GONE - } - - else -> { - EventLogger.logCustomEvent( - action = "AB_TEST", - category = "a/b test 로깅(3차 스프린트, 혜택페이지)", - label = "BUSINESS_benefit_1", - value = "혜택X" - ) - binding.storeButtonLayout.visibility = View.GONE - binding.recyclerViewStoreCategory.visibility = View.VISIBLE - } - } - } } private fun initBusViewPagerScrollCallback(busArrivalInfos: List) { diff --git a/koin/src/main/java/in/koreatech/koin/ui/main/viewmodel/MainActivityViewModel.kt b/koin/src/main/java/in/koreatech/koin/ui/main/viewmodel/MainActivityViewModel.kt index 143ef83f2..5325b8f92 100644 --- a/koin/src/main/java/in/koreatech/koin/ui/main/viewmodel/MainActivityViewModel.kt +++ b/koin/src/main/java/in/koreatech/koin/ui/main/viewmodel/MainActivityViewModel.kt @@ -61,8 +61,7 @@ class MainActivityViewModel @Inject constructor( emit(it) when (it) { ExperimentGroup.MAIN_BANNER_NEW -> { - EventLogger.logCustomEvent( - "AB_TEST", + EventLogger.logABTestEvent( "a/b test 로깅(키워드관리 진입 배너)", AnalyticsConstant.Label.CAMPUS_NOTICE_1, "진입점O" @@ -70,8 +69,7 @@ class MainActivityViewModel @Inject constructor( } ExperimentGroup.MAIN_BANNER_ORIGINAL -> { - EventLogger.logCustomEvent( - "AB_TEST", + EventLogger.logABTestEvent( "a/b test 로깅(키워드관리 진입 배너)", AnalyticsConstant.Label.CAMPUS_NOTICE_1, "진입점X" @@ -92,8 +90,7 @@ class MainActivityViewModel @Inject constructor( emit(it) when (it) { ExperimentGroup.MAIN_DINING_NEW -> { - EventLogger.logCustomEvent( - "AB_TEST", + EventLogger.logABTestEvent( "a/b test 로깅(식단 메인 진입점)", AnalyticsConstant.Label.CAMPUS_DINING_1, "더보기O" @@ -101,8 +98,7 @@ class MainActivityViewModel @Inject constructor( } ExperimentGroup.MAIN_DINING_ORIGINAL -> { - EventLogger.logCustomEvent( - "AB_TEST", + EventLogger.logABTestEvent( "a/b test 로깅(식단 메인 진입점)", AnalyticsConstant.Label.CAMPUS_DINING_1, "더보기X" diff --git a/koin/src/main/java/in/koreatech/koin/ui/store/activity/StoreDetailActivity.kt b/koin/src/main/java/in/koreatech/koin/ui/store/activity/StoreDetailActivity.kt index 1e9755005..f574060e9 100644 --- a/koin/src/main/java/in/koreatech/koin/ui/store/activity/StoreDetailActivity.kt +++ b/koin/src/main/java/in/koreatech/koin/ui/store/activity/StoreDetailActivity.kt @@ -4,7 +4,6 @@ import android.Manifest import android.annotation.SuppressLint import android.content.ClipData import android.content.ClipboardManager -import android.content.SharedPreferences import android.os.Bundle import android.view.MotionEvent import android.view.View @@ -14,9 +13,7 @@ import androidx.activity.viewModels import androidx.appcompat.app.AlertDialog import androidx.core.content.ContextCompat import androidx.core.view.isVisible -import androidx.lifecycle.Lifecycle import androidx.lifecycle.lifecycleScope -import androidx.lifecycle.repeatOnLifecycle import androidx.viewpager2.widget.ViewPager2 import com.google.android.material.tabs.TabLayout import com.google.android.material.tabs.TabLayoutMediator @@ -321,11 +318,10 @@ class StoreDetailActivity : KoinNavigationDrawerActivity() { abtestName = it when (viewModel.variableName.value) { ExperimentGroup.CALL_NUMBER -> { - EventLogger.logCustomEvent( - action = "AB_TEST", - category = "a/b test 로깅(전화하기)", - label = AnalyticsConstant.Label.BUSINESS_CALL_NUMBER, - value = "number" + EventLogger.logABTestEvent( + "a/b test 로깅(전화하기)", + AnalyticsConstant.Label.BUSINESS_CALL_1, + "number" ) binding.callFloatingButton.visibility = View.GONE binding.storeDetailPhoneTextview.setTextColor( @@ -339,11 +335,10 @@ class StoreDetailActivity : KoinNavigationDrawerActivity() { ExperimentGroup.CALL_FLOATING -> { binding.scrollUpButton.visibility = View.GONE binding.storeDetailPhoneImage.visibility = View.GONE - EventLogger.logCustomEvent( - action = "AB_TEST", - category = "a/b test 로깅(전화하기)", - label = AnalyticsConstant.Label.BUSINESS_CALL_FLOATING, - value = "floating" + EventLogger.logABTestEvent( + "a/b test 로깅(전화하기)", + AnalyticsConstant.Label.BUSINESS_CALL_1, + "floating" ) } } From fd4b1e11e5696e7dffdf014a078d7512b9e88696 Mon Sep 17 00:00:00 2001 From: wateralsie Date: Thu, 19 Dec 2024 09:31:00 +0900 Subject: [PATCH 13/13] update: v4.1.6 --- build.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 30bccedd5..f00a42392 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,8 +7,8 @@ buildscript { } extra.apply { - set("versionName", "4.1.5") - set("versionCode", 40105) + set("versionName", "4.1.6") + set("versionCode", 40106) // 코인 버전 관리 set("versionBusinessName", "1.0.1")