Skip to content

Commit 4a1bc12

Browse files
authored
Merge pull request #294 from TeamDMU/chore/target-sdk-35
Feat: Android 15(API μˆ˜μ€€ 35) 이상 νƒ€κ²ŸνŒ…
2 parents 50d3eb2 + 20d6ba6 commit 4a1bc12

File tree

19 files changed

+179
-192
lines changed

19 files changed

+179
-192
lines changed

β€Žapp/build.gradleβ€Ž

Lines changed: 33 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ plugins {
66
}
77

88
android {
9-
compileSdk 34
9+
compileSdk 35
1010

1111
Properties properties = new Properties()
1212
properties.load(project.rootProject.file('local.properties').newDataInputStream())
1313

1414
defaultConfig {
1515
applicationId "com.dongyang.android.youdongknowme"
1616
minSdk 24
17-
targetSdk 34
17+
targetSdk 35
1818
versionCode 17
1919
versionName "2.3.1"
2020

@@ -44,63 +44,64 @@ android {
4444
}
4545

4646
dependencies {
47-
implementation 'androidx.core:core-ktx:1.7.0'
48-
implementation 'androidx.appcompat:appcompat:1.4.1'
49-
implementation 'com.google.android.material:material:1.7.0'
50-
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
47+
implementation 'androidx.core:core-ktx:1.16.0'
48+
implementation 'androidx.appcompat:appcompat:1.7.1'
49+
implementation 'com.google.android.material:material:1.12.0'
50+
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
5151
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
52-
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.1'
52+
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.9.2'
53+
implementation("androidx.activity:activity-ktx:1.10.1")
5354
testImplementation 'junit:junit:4.13.2'
54-
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
55-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
56-
55+
androidTestImplementation 'androidx.test.ext:junit:1.3.0'
56+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.7.0'
5757

5858
// preference
59-
implementation 'androidx.preference:preference:1.2.0'
59+
implementation 'androidx.preference:preference-ktx:1.2.1'
6060

6161
// Coroutines
62-
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4"
62+
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2"
6363

6464
// ViewModelScope
65-
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1"
65+
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.9.2"
6666

6767
// Retrofit2
68-
implementation "com.squareup.retrofit2:retrofit:2.9.0"
69-
implementation "com.squareup.retrofit2:converter-gson:2.9.0"
68+
implementation "com.squareup.retrofit2:retrofit:3.0.0"
69+
implementation "com.squareup.retrofit2:converter-gson:3.0.0"
7070

7171
// OkHttp
72-
implementation "com.squareup.okhttp3:okhttp:4.10.0"
73-
implementation "com.squareup.okhttp3:logging-interceptor:4.10.0"
74-
implementation "com.squareup.okhttp3:okhttp-urlconnection:4.9.1"
72+
implementation "com.squareup.okhttp3:okhttp:5.1.0"
73+
implementation "com.squareup.okhttp3:logging-interceptor:5.1.0"
74+
implementation "com.squareup.okhttp3:okhttp-urlconnection:5.1.0"
7575

7676
// Gson
77-
implementation 'com.google.code.gson:gson:2.9.0'
77+
implementation 'com.google.code.gson:gson:2.13.1'
7878

7979
// Room
80-
implementation 'androidx.room:room-common:2.4.3'
81-
implementation 'androidx.room:room-ktx:2.4.3'
82-
kapt "androidx.room:room-compiler:2.4.3"
80+
implementation 'androidx.room:room-common:2.7.2'
81+
implementation 'androidx.room:room-ktx:2.7.2'
82+
//noinspection KaptUsageInsteadOfKsp
83+
kapt "androidx.room:room-compiler:2.7.2"
8384

8485
// Koin
85-
implementation "io.insert-koin:koin-core:3.1.2"
86-
implementation "io.insert-koin:koin-android:3.1.2"
86+
implementation "io.insert-koin:koin-core:4.1.0"
87+
implementation "io.insert-koin:koin-android:4.1.0"
8788

8889
// Animation
89-
implementation 'com.daimajia.easing:library:2.0@aar'
90+
implementation 'com.daimajia.easing:library:2.4@aar'
9091
implementation 'com.daimajia.androidanimations:library:2.4@aar'
9192

9293
// MaterialCalendarView
9394
implementation 'com.github.prolificinteractive:material-calendarview:2.0.0'
9495
implementation 'com.jakewharton.threetenabp:threetenabp:1.2.0'
9596

9697
// Glide
97-
implementation 'com.github.bumptech.glide:glide:4.13.2'
98-
annotationProcessor 'com.github.bumptech.glide:compiler:4.13.2'
98+
implementation 'com.github.bumptech.glide:glide:4.16.0'
99+
annotationProcessor 'com.github.bumptech.glide:compiler:4.16.0'
99100

100101
// Firebase
101-
implementation platform('com.google.firebase:firebase-bom:30.0.0')
102+
implementation platform('com.google.firebase:firebase-bom:34.1.0')
102103
implementation 'com.google.firebase:firebase-analytics'
103-
implementation 'com.google.firebase:firebase-messaging:23.4.1'
104+
implementation 'com.google.firebase:firebase-messaging:25.0.0'
104105

105106
// Timber
106107
implementation 'com.jakewharton.timber:timber:5.0.1'
@@ -112,15 +113,11 @@ dependencies {
112113
implementation 'com.google.android.flexbox:flexbox:3.0.0'
113114

114115
// Lottie
115-
implementation "com.airbnb.android:lottie:5.2.0"
116-
117-
// Navigation
118-
implementation("androidx.navigation:navigation-fragment-ktx:2.5.3")
119-
implementation("androidx.navigation:navigation-ui-ktx:2.5.3")
116+
implementation "com.airbnb.android:lottie:6.6.7"
120117

121118
// MinSdk
122-
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
119+
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'
123120

124121
// Window Manager
125-
implementation 'androidx.window:window:1.0.0'
122+
implementation 'androidx.window:window:1.4.0'
126123
}

β€Žapp/src/main/java/com/dongyang/android/youdongknowme/standard/base/BaseActivity.ktβ€Ž

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
package com.dongyang.android.youdongknowme.standard.base
22

3-
import android.content.Context
43
import android.os.Bundle
54
import android.text.Spannable
65
import android.text.SpannableStringBuilder
76
import android.text.style.ForegroundColorSpan
87
import android.widget.TextView
8+
import androidx.activity.enableEdgeToEdge
99
import androidx.appcompat.app.AppCompatActivity
10+
import androidx.core.view.ViewCompat
11+
import androidx.core.view.WindowInsetsCompat
12+
import androidx.core.view.updatePadding
1013
import androidx.databinding.DataBindingUtil
1114
import androidx.databinding.ViewDataBinding
1215
import com.dongyang.android.youdongknowme.ui.view.LoadingDialog
@@ -24,10 +27,21 @@ abstract class BaseActivity<T : ViewDataBinding, R : BaseViewModel> : AppCompatA
2427

2528
override fun onCreate(savedInstanceState: Bundle?) {
2629
super.onCreate(savedInstanceState)
30+
enableEdgeToEdge()
2731
binding = DataBindingUtil.setContentView(this, layoutResourceId)
2832
binding.lifecycleOwner = this
2933
setContentView(binding.root)
3034

35+
ViewCompat.setOnApplyWindowInsetsListener(binding.root) { v, insets ->
36+
val inset = insets.getInsets(WindowInsetsCompat.Type.systemBars())
37+
v.updatePadding(
38+
top = inset.top,
39+
bottom = inset.bottom,
40+
left = inset.left,
41+
right = inset.right,
42+
)
43+
insets
44+
}
3145
initStartView()
3246
initDataBinding()
3347
initAfterBinding()
@@ -36,7 +50,7 @@ abstract class BaseActivity<T : ViewDataBinding, R : BaseViewModel> : AppCompatA
3650
protected fun setSpanText(
3751
spanTextView: TextView,
3852
startIdx: Int,
39-
endIdx: Int
53+
endIdx: Int,
4054
) {
4155
SpannableStringBuilder(spanTextView.text).apply {
4256
setSpan(
@@ -90,4 +104,4 @@ abstract class BaseActivity<T : ViewDataBinding, R : BaseViewModel> : AppCompatA
90104

91105
abstract fun initAfterBinding()
92106

93-
}
107+
}

β€Žapp/src/main/java/com/dongyang/android/youdongknowme/ui/view/cafeteria/CafeteriaContainer.ktβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ class CafeteriaContainer(
6565
tvItemCalendarMonth.setTextColor(color)
6666
}
6767
}
68-
}
68+
}

β€Žapp/src/main/java/com/dongyang/android/youdongknowme/ui/view/cafeteria/CafeteriaFragment.ktβ€Ž

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ import com.kizitonwose.calendarview.model.CalendarDay
1818
import com.kizitonwose.calendarview.ui.DayBinder
1919
import com.kizitonwose.calendarview.utils.Size
2020
import org.koin.androidx.viewmodel.ext.android.viewModel
21-
import java.time.DayOfWeek.*
21+
import java.time.DayOfWeek.MONDAY
22+
import java.time.DayOfWeek.SATURDAY
23+
import java.time.DayOfWeek.SUNDAY
2224
import java.time.LocalDate
2325
import java.time.YearMonth
2426
import java.time.temporal.TemporalAdjusters
@@ -64,7 +66,11 @@ class CafeteriaFragment : BaseFragment<FragmentCafeteriaBinding, CafeteriaViewMo
6466

6567
viewModel.selectedDate.observe(viewLifecycleOwner) {
6668
viewModel.updateDaysMenu(it)
67-
viewModel.selectedCategory.value?.let { selectedCategory -> updateCafeteriaState(selectedCategory) }
69+
viewModel.selectedCategory.value?.let { selectedCategory ->
70+
updateCafeteriaState(
71+
selectedCategory
72+
)
73+
}
6874
}
6975
}
7076

@@ -126,7 +132,8 @@ class CafeteriaFragment : BaseFragment<FragmentCafeteriaBinding, CafeteriaViewMo
126132
}
127133

128134
private fun setupCalendar() {
129-
val wmc = WindowMetricsCalculator.getOrCreate().computeCurrentWindowMetrics(requireActivity())
135+
val wmc =
136+
WindowMetricsCalculator.getOrCreate().computeCurrentWindowMetrics(requireActivity())
130137
val dayWidth = wmc.bounds.width() / DATE_CELL_COUNT
131138
val dayHeight: Int = TypedValue.applyDimension(
132139
TypedValue.COMPLEX_UNIT_DIP,
@@ -155,8 +162,10 @@ class CafeteriaFragment : BaseFragment<FragmentCafeteriaBinding, CafeteriaViewMo
155162

156163
binding.tvCafeteriaWeekend.isVisible = isWeekend
157164

158-
binding.linearLayoutCafeteriaKorean.isVisible = selectedCategory == getString(R.string.cafeteria_korean) && !isWeekend
159-
binding.linearLayoutCafeteriaAnother.isVisible = selectedCategory == getString(R.string.cafeteria_another) && !isWeekend
165+
binding.linearLayoutCafeteriaKorean.isVisible =
166+
selectedCategory == getString(R.string.cafeteria_korean) && !isWeekend
167+
binding.linearLayoutCafeteriaAnother.isVisible =
168+
selectedCategory == getString(R.string.cafeteria_another) && !isWeekend
160169

161170
binding.btnKorean.setBackgroundColor(if (selectedCategory == getString(R.string.cafeteria_korean)) activeColor else inactiveColor)
162171
binding.btnAnother.setBackgroundColor(if (selectedCategory == getString(R.string.cafeteria_another)) activeColor else inactiveColor)

β€Žapp/src/main/java/com/dongyang/android/youdongknowme/ui/view/cafeteria/CalendarInterface.ktβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ interface CalendarInterface {
88
viewModel: CafeteriaViewModel,
99
calendarView: CalendarView,
1010
oldDate: LocalDate?,
11-
selectedDate: LocalDate
11+
selectedDate: LocalDate,
1212
) {
1313
viewModel.updateMenuList(selectedDate)
1414
viewModel.updateDaysMenu(selectedDate)

β€Žapp/src/main/java/com/dongyang/android/youdongknowme/ui/view/keyword/KeywordActivity.ktβ€Ž

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@ class KeywordActivity : BaseActivity<ActivityKeywordBinding, KeywordViewModel>()
2222
override fun initDataBinding() {
2323
// νš¨μœ¨μ„ μœ„ν•΄ 단 ν•œλ²ˆλ§Œ μ˜΅μ €λΉ™ν•˜μ—¬ 이미 ꡬ독쀑인 ν•­λͺ©μ„ 선택 처리
2424
viewModel.localKeywordList.observe(this, object : Observer<List<KeywordEntity>> {
25-
override fun onChanged(t: List<KeywordEntity>?) {
26-
viewModel.setAllKeywords(t?.filter { it.isSubscribe }?.map { it.name }
27-
?: listOf(""))
25+
override fun onChanged(value: List<KeywordEntity>) {
26+
viewModel.setAllKeywords(value.filter { it.isSubscribe }.map { it.name })
2827
setCheckChipChange(
2928
binding.chipGroupKeywordClass,
3029
binding.chipGroupKeywordMoney,

β€Žapp/src/main/java/com/dongyang/android/youdongknowme/ui/view/keyword/OnboardingKeywordActivity.ktβ€Ž

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ class OnboardingKeywordActivity :
2828
override fun initDataBinding() {
2929
// νš¨μœ¨μ„ μœ„ν•΄ 단 ν•œλ²ˆλ§Œ μ˜΅μ €λΉ™ν•˜μ—¬ 이미 ꡬ독쀑인 ν•­λͺ©μ„ 선택 처리
3030
viewModel.localKeywordList.observe(this, object : Observer<List<KeywordEntity>> {
31-
override fun onChanged(t: List<KeywordEntity>?) {
32-
viewModel.setAllKeywords(t?.filter { it.isSubscribe }?.map { it.name }
33-
?: listOf(""))
31+
override fun onChanged(value: List<KeywordEntity>) {
32+
viewModel.setAllKeywords(value.filter { it.isSubscribe }. map{it.name})
3433
setCheckChipChange(
3534
binding.chipGroupOnboardingKeywordClass,
3635
binding.chipGroupOnboardingKeywordMoney,

0 commit comments

Comments
Β (0)