diff --git a/.github/workflows/develop_PR_builder.yml b/.github/workflows/develop_PR_builder.yml index 245c1b3ef..05b15a5ca 100644 --- a/.github/workflows/develop_PR_builder.yml +++ b/.github/workflows/develop_PR_builder.yml @@ -30,7 +30,7 @@ jobs: - name: set up JDK 17 uses: actions/setup-java@v4 with: - distribution: 'temurin' + distribution: 'zulu' java-version: 17 - name: Change gradlew permissions @@ -67,8 +67,5 @@ jobs: - name: Access Firebase Service run: echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > ./app/google-services.json - # - name: Lint Check - # run: ./gradlew ktlintCheck --exclude '**/*.kts' src - - name: Build debug APK - run: ./gradlew assembleDebug --stacktrace + run: ./gradlew :app:assembleDebug --stacktrace diff --git a/.github/workflows/develop_merge_builder.yml b/.github/workflows/develop_merge_builder.yml index 3b9c8032a..c10f48c21 100644 --- a/.github/workflows/develop_merge_builder.yml +++ b/.github/workflows/develop_merge_builder.yml @@ -30,7 +30,7 @@ jobs: - name: set up JDK 17 uses: actions/setup-java@v4 with: - distribution: 'temurin' + distribution: 'zulu' java-version: 17 - name: Change gradlew permissions @@ -67,8 +67,5 @@ jobs: - name: Access Firebase Service run: echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > ./app/google-services.json - # - name: Lint Check - # run: ./gradlew ktlintCheck --exclude '**/*.kts' src - - name: Build debug APK - run: ./gradlew assembleDebug --stacktrace + run: ./gradlew :app:assembleDebug --stacktrace diff --git a/app/src/main/java/org/sopt/official/feature/notification/SchemeActivity.kt b/app/src/main/java/org/sopt/official/feature/notification/SchemeActivity.kt index ca36e463f..5109c45d2 100644 --- a/app/src/main/java/org/sopt/official/feature/notification/SchemeActivity.kt +++ b/app/src/main/java/org/sopt/official/feature/notification/SchemeActivity.kt @@ -30,29 +30,24 @@ import android.content.Intent import android.net.Uri import android.os.Bundle import androidx.appcompat.app.AppCompatActivity -import dagger.hilt.android.AndroidEntryPoint +import dagger.hilt.android.EntryPointAccessors import org.sopt.official.auth.model.UserStatus import org.sopt.official.common.navigator.DeepLinkType import org.sopt.official.common.util.extractQueryParameter import org.sopt.official.common.util.isExpiredDate import org.sopt.official.common.util.serializableExtra -import org.sopt.official.feature.home.HomeActivity import org.sopt.official.feature.notification.detail.NotificationDetailActivity -import org.sopt.official.network.persistence.SoptDataStore +import org.sopt.official.network.persistence.SoptDataStoreEntryPoint import timber.log.Timber import java.io.Serializable -import javax.inject.Inject -@AndroidEntryPoint class SchemeActivity : AppCompatActivity() { - @Inject - lateinit var dataStore: SoptDataStore - private val args by serializableExtra( - Argument( - "", - "" - ) - ) + private val dataStore by lazy { + EntryPointAccessors + .fromApplication(applicationContext) + .soptDataStore() + } + private val args by serializableExtra(Argument("", "")) override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) @@ -61,13 +56,13 @@ class SchemeActivity : AppCompatActivity() { private fun handleDeepLink() { val link = args?.link - val linkIntent = when (link.isNullOrBlank()) { - true -> NotificationDetailActivity.getIntent( + val linkIntent = if (link.isNullOrBlank()) { + NotificationDetailActivity.getIntent( this, args?.notificationId.orEmpty() ) - - false -> checkLinkExpiration(link) + } else { + checkLinkExpiration(link) } when (!isTaskRoot) { @@ -115,7 +110,9 @@ class SchemeActivity : AppCompatActivity() { } } - private fun isIntentToHome(): Boolean = intent.component?.className == HomeActivity::class.java.name + private fun isIntentToHome(): Boolean { + return intent.action == Intent.ACTION_MAIN && (intent.categories?.contains(Intent.CATEGORY_LAUNCHER) == true) + } data class Argument( val notificationId: String, @@ -124,15 +121,7 @@ class SchemeActivity : AppCompatActivity() { companion object { @JvmStatic - fun getIntent( - context: Context, - args: Argument - ) = Intent( - context, - SchemeActivity::class.java - ).putExtra( - "args", - args - ) + fun getIntent(context: Context, args: Argument) = Intent(context, SchemeActivity::class.java) + .putExtra("args", args) } } diff --git a/build-logic/gradle/wrapper/gradle-wrapper.properties b/build-logic/gradle/wrapper/gradle-wrapper.properties index f9d497cae..7632234da 100644 --- a/build-logic/gradle/wrapper/gradle-wrapper.properties +++ b/build-logic/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Fri Jan 13 12:46:38 KST 2023 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/core/network/src/main/java/org/sopt/official/network/persistence/SoptDataStore.kt b/core/network/src/main/java/org/sopt/official/network/persistence/SoptDataStore.kt index 499c79d19..298ce07b0 100644 --- a/core/network/src/main/java/org/sopt/official/network/persistence/SoptDataStore.kt +++ b/core/network/src/main/java/org/sopt/official/network/persistence/SoptDataStore.kt @@ -26,11 +26,14 @@ package org.sopt.official.network.persistence import android.content.Context import androidx.core.content.edit +import dagger.hilt.EntryPoint +import dagger.hilt.InstallIn import dagger.hilt.android.qualifiers.ApplicationContext -import javax.inject.Inject -import javax.inject.Singleton +import dagger.hilt.components.SingletonComponent import org.sopt.official.common.di.LocalStore import org.sopt.official.common.file.createSharedPreference +import javax.inject.Inject +import javax.inject.Singleton @Singleton class SoptDataStore @Inject constructor( @@ -77,3 +80,9 @@ class SoptDataStore @Inject constructor( private const val UNAUTHENTICATED = "UNAUTHENTICATED" } } + +@EntryPoint +@InstallIn(SingletonComponent::class) +interface SoptDataStoreEntryPoint { + fun soptDataStore(): SoptDataStore +} diff --git a/gradle.properties b/gradle.properties index 51bbe0826..16d2db80f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,3 +9,4 @@ org.gradle.jvmargs=-Xmx4092m -Dfile.encoding\=UTF-8 android.useAndroidX=true kotlin.incremental.usePreciseJavaTracking=true android.enableJetifier=false +ksp.useKSP2=false diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 8601b4887..627a96a01 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -16,13 +16,13 @@ corektx = "1.13.1" appcompat = "1.7.0" activity = "1.9.2" fragmentKtx = "1.8.3" -lifecycle = "2.8.5" +lifecycle = "2.8.6" swipe-refresh-layout = "1.1.0" -navigation = "2.8.0" -startup = "1.1.1" +navigation = "2.8.1" +startup = "1.2.0" customtab = "1.8.0" exifinterface = "1.3.7" -compose-bom = "2024.09.01" +compose-bom = "2024.09.02" androidx-paging = "3.3.2" desugarJdk = "2.1.2" @@ -66,9 +66,9 @@ process-pheonix = "3.0.0" amplitude = "1.18.0" spotless = "6.25.0" constraintlayout = "2.1.4" -benchmark-macro-junit4 = "1.3.0" -androidx-baselineprofile = "1.3.0" -profileinstaller = "1.3.1" +benchmark-macro-junit4 = "1.3.1" +androidx-baselineprofile = "1.3.1" +profileinstaller = "1.4.0" [libraries] agp = { module = "com.android.tools.build:gradle", version.ref = "gradleplugin" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 0aaefbcaf..df97d72b8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME