Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#276 [build] SDK 34 업그레이드 #277

Merged
merged 24 commits into from
Nov 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4814a92
#276 [build] 불필요한 의존성 제거
2zerozu Oct 3, 2023
130366b
#276 [feat] 실험적 API 사용에 대한 Opt-in 어노테이션 추가
2zerozu Oct 4, 2023
8b3972e
#276 [build] appcompat 안정화 버전으로 수정
2zerozu Oct 5, 2023
b245069
#276 [build] play-services-tagmanager 버전 업데이트
2zerozu Oct 6, 2023
b9ee7f2
#276 [build] mlkit 버전 업데이트
2zerozu Oct 7, 2023
db568c0
#276 [build] camera 관련 의존성 안정화 버전으로 업데이트
2zerozu Oct 8, 2023
f0f384e
#276 [build] sdk 34 업데이트
2zerozu Oct 9, 2023
b8a3813
#276 [feat] sdk 34로 인한 onDraw override 파라미터 수정
2zerozu Oct 10, 2023
5e0eae3
#276 [build] 자바 버전 11에서 17로 업데이트
2zerozu Oct 11, 2023
b2c5e2b
#276 [build] kotlin 버전, android 버전, gradle 버전 업데이트
2zerozu Oct 12, 2023
1e5fe8a
#276 [build] hilt 버전 업그레이드
2zerozu Oct 13, 2023
4730dd5
#276 [build] security 버전 업그레이드
2zerozu Oct 14, 2023
7c85d6d
#276 [build] ktx 버전 업그레이드
2zerozu Oct 15, 2023
d7c87d3
#276 [build] recyclerview 버전 업그레이드
2zerozu Oct 16, 2023
7b93e24
#276 [build] navigation 버전 업그레이드
2zerozu Oct 17, 2023
fe8cc16
#276 [build] cameraX 버전 업그레이드
2zerozu Oct 18, 2023
f77b644
#276 [build] core 버전 업그레이드
2zerozu Oct 21, 2023
83aff13
#276 [build] material 버전 업그레이드
2zerozu Oct 22, 2023
c3357f7
#276 [feat] 화면전환애니메이션 확장함수 작성
2zerozu Oct 23, 2023
11b3a95
#276 [feat] BookActivity에 화면전환애니메이션 확장함수 적용
2zerozu Oct 24, 2023
7b1bcf3
#276 [chore] java 버전 업그레이드
2zerozu Oct 28, 2023
4b8819a
#276 [build] 의존성 버전 업그레이드
2zerozu Nov 24, 2023
ebc5105
#276 [build] proguard 규칙 dontwarn 추가
2zerozu Nov 24, 2023
371bde8
#276 [feat] manifest 권한 설정 수정
2zerozu Nov 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/pr_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-

- name: set up JDK 11
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
java-version: '17'
distribution: 'corretto'
cache: gradle

- name: Create Google-Services.json
Expand Down
69 changes: 33 additions & 36 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ properties.load(project.rootProject.file('local.properties').newDataInputStream(

android {
namespace 'com.sopt.peekabookaos'
compileSdk 33
compileSdk 34

defaultConfig {
applicationId "com.sopt.peekabookaos"
minSdk 28
targetSdk 33
targetSdk 34
versionCode 5
versionName "1.0.2"

Expand All @@ -44,13 +44,14 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '11'
jvmTarget = '17'
}
buildFeatures {
buildConfig true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

얘가 추가로 필요해진 이유가 뭔가요?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

얘가 추가로 필요해진 이유가 뭔가요?

Sdk 34부터 추가해야한다고 하네요
이제 buildConfig도 없어질 예정이라고 하더이다^__^..

viewBinding true
dataBinding true
}
Expand All @@ -63,58 +64,55 @@ dependencies {
kapt 'com.github.bumptech.glide:compiler:4.13.2'

// hilt
implementation 'com.google.dagger:hilt-android:2.44.2'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
kapt 'com.google.dagger:hilt-compiler:2.44'
implementation 'com.google.dagger:hilt-android:2.48.1'
kapt 'com.google.dagger:hilt-compiler:2.48.1'

// shared preference
implementation 'androidx.security:security-crypto-ktx:1.1.0-alpha04'
implementation 'androidx.security:security-crypto-ktx:1.1.0-alpha06'

// ktx
implementation 'androidx.activity:activity-ktx:1.6.1'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.1'
implementation 'androidx.fragment:fragment-ktx:1.5.5'
implementation 'androidx.activity:activity-ktx:1.8.1'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.2'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.2'
implementation 'androidx.fragment:fragment-ktx:1.6.2'

// recyclerview
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.recyclerview:recyclerview:1.3.2'

// coroutine
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3'

// network
implementation 'com.squareup.okhttp3:logging-interceptor:4.10.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.11.0'
implementation(platform('com.squareup.okhttp3:okhttp-bom:4.11.0'))
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:0.8.0'
implementation(platform('com.squareup.okhttp3:okhttp-bom:4.10.0'))
implementation 'com.squareup.okhttp3:okhttp'
implementation 'com.squareup.okhttp3:logging-interceptor'
implementation 'com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:1.0.0'

// Json
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1'
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.1'

// timber
implementation 'com.jakewharton.timber:timber:5.0.1'

//navigation
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.3'
implementation 'androidx.navigation:navigation-ui-ktx:2.5.3'
implementation 'androidx.navigation:navigation-fragment-ktx:2.7.5'
implementation 'androidx.navigation:navigation-ui-ktx:2.7.5'

// CameraX
implementation 'androidx.camera:camera-core:1.2.0'
implementation 'androidx.camera:camera-camera2:1.2.0'
implementation 'androidx.camera:camera-lifecycle:1.2.0'
implementation 'androidx.camera:camera-view:1.2.0'
implementation 'androidx.camera:camera-core:1.3.0'
implementation 'androidx.camera:camera-camera2:1.3.0'
implementation 'androidx.camera:camera-lifecycle:1.3.0'
implementation 'androidx.camera:camera-view:1.3.0'

// ML Kit
implementation 'com.google.android.gms:play-services-mlkit-barcode-scanning:18.1.0'
implementation 'com.google.android.gms:play-services-mlkit-barcode-scanning:18.3.0'

// SlidingUpPanel
implementation 'com.sothree.slidinguppanel:library:3.4.0'

//coil
implementation 'io.coil-kt:coil:2.2.2'
implementation 'io.coil-kt:coil:2.5.0'

// lottie
implementation 'com.airbnb.android:lottie:5.2.0'
Expand All @@ -126,13 +124,12 @@ dependencies {
implementation 'androidx.exifinterface:exifinterface:1.3.6'

// firebase
implementation platform('com.google.firebase:firebase-bom:29.0.0')
implementation 'com.google.firebase:firebase-analytics-ktx'
implementation 'com.google.android.gms:play-services-tagmanager:18.0.3'
implementation platform('com.google.firebase:firebase-bom:32.6.0')
implementation 'com.google.android.gms:play-services-tagmanager:18.0.4'

implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'com.google.android.material:material:1.9.0'
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.10.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
Expand Down
4 changes: 3 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@
-keep class * extends com.google.gson.TypeAdapter

-keep class com.sopt.peekabookaos.domain.entity.** { *; }
-keep class com.sopt.peekabookaos.data.entity.** { *; }
-keep class com.sopt.peekabookaos.data.entity.** { *; }

-dontwarn com.google.protobuf.java_com_google_android_gmscore_sdk_target_granule__proguard_group_gtm_N1281923064GeneratedExtensionRegistryLite$Loader
10 changes: 8 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-feature
android:name="android.hardware.camera"
android:required="false" />

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />

<uses-permission
android:name="com.google.android.gms.permission.AD_ID"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.json.Json
import okhttp3.Interceptor
import okhttp3.MediaType.Companion.toMediaType
Expand Down Expand Up @@ -50,6 +51,7 @@ object NaverRetrofitModule {
}
).build()

@OptIn(ExperimentalSerializationApi::class)
@NaverType
@Provides
fun providesNaverRetrofit(@NaverType okHttpClient: OkHttpClient): Retrofit =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.json.Json
import okhttp3.Interceptor
import okhttp3.MediaType.Companion.toMediaType
Expand Down Expand Up @@ -64,6 +65,7 @@ object RefreshRetrofitModule {
)
.build()

@OptIn(ExperimentalSerializationApi::class)
@Provides
@Singleton
@RefreshType
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/com/sopt/peekabookaos/di/RetrofitModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import dagger.hilt.InstallIn
import dagger.hilt.android.qualifiers.ApplicationContext
import dagger.hilt.components.SingletonComponent
import kotlinx.coroutines.runBlocking
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.json.Json
import okhttp3.Interceptor
import okhttp3.MediaType.Companion.toMediaType
Expand Down Expand Up @@ -141,6 +142,7 @@ object RetrofitModule {
}
).build()

@OptIn(ExperimentalSerializationApi::class)
@PeekaType
@Singleton
@Provides
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ class BarcodeGuideView @JvmOverloads constructor(
xfermode = PorterDuffXfermode(PorterDuff.Mode.CLEAR)
}

override fun onDraw(canvas: Canvas?) {
override fun onDraw(canvas: Canvas) {
super.onDraw(canvas)
if (canvas == null) return
setBackgroundColor(Color.argb(99, 0, 0, 0))
drawHole(canvas)
drawBorder(canvas)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package com.sopt.peekabookaos.presentation.book

import android.app.Activity
import android.os.Bundle
import androidx.navigation.fragment.NavHostFragment
import com.sopt.peekabookaos.R
import com.sopt.peekabookaos.databinding.ActivityBookBinding
import com.sopt.peekabookaos.util.binding.BindingActivity
import com.sopt.peekabookaos.util.extensions.activityTransition
import dagger.hilt.android.AndroidEntryPoint

@AndroidEntryPoint
Expand All @@ -22,18 +24,31 @@ class BookActivity : BindingActivity<ActivityBookBinding>(R.layout.activity_book
when (intent.getStringExtra(LOCATION) ?: CREATE) {
RECOMMEND -> {
navController.navigate(R.id.action_barcodeScannerFragment_to_searchBookFragment)
overridePendingTransition(R.animator.anim_from_right, R.animator.anim_to_left)
activityTransition(
Activity.OVERRIDE_TRANSITION_OPEN,
R.animator.anim_from_right,
R.animator.anim_to_left
)
}

else -> {
navController.navigate(R.id.barcodeScannerFragment)
overridePendingTransition(R.animator.anim_from_bottom, R.animator.anim_to_top)
activityTransition(
Activity.OVERRIDE_TRANSITION_OPEN,
R.animator.anim_from_bottom,
R.animator.anim_to_top
)
}
}
}

override fun finish() {
super.finish()
overridePendingTransition(R.animator.anim_from_left, R.animator.anim_to_right)
activityTransition(
Activity.OVERRIDE_TRANSITION_CLOSE,
R.animator.anim_from_left,
R.animator.anim_to_right
)
}

companion object {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.sopt.peekabookaos.util.extensions

import android.app.Activity
import android.os.Build

fun Activity.activityTransition(transitionType: Int, enterAnim: Int, exitAnim: Int) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
overrideActivityTransition(transitionType, enterAnim, exitAnim)
} else {
overridePendingTransition(enterAnim, exitAnim)
}
}
Comment on lines +6 to +12
Copy link
Member

@stellar-halo stellar-halo Nov 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

새로 생긴 util이네요. overrideActivityTransition가 Android 14에 추가된 함수인 것 같은데 맞나요?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

새로 생긴 util이네요. overrideActivityTransition가 Android 14에 추가된 함수인 것 같은데 맞나요?

맞아요 .. overridePendingTransition 대신 overrideActivityTransition 사용해야 하더라구요 ㅠ

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

떼잉~ 버전에 따라 자꾸 노나야 하는 게 생기네요

12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
dependencies {
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.44'
classpath 'com.android.tools.build:gradle:7.0.4'
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.46'
classpath 'com.android.tools.build:gradle:7.3.1'
classpath 'com.google.gms:google-services:4.4.0'
}

Expand All @@ -13,11 +13,11 @@ buildscript {
}

plugins {
id 'com.android.application' version '7.3.1' apply false
id 'com.android.library' version '7.3.1' apply false
id 'org.jetbrains.kotlin.android' version '1.7.20' apply false
id 'com.android.application' version '8.1.1' apply false
id 'com.android.library' version '8.1.1' apply false
id 'org.jetbrains.kotlin.android' version '1.9.0' apply false
}

task clean(type: Delete) {
tasks.register('clean', Delete) {
delete rootProject.buildDir
}
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Dec 28 16:03:15 KST 2022
#Fri Nov 24 19:25:42 KST 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Loading