Skip to content

Commit f445ddf

Browse files
authored
Merge pull request #10 from brave-experiments/update_compile_sdk
Update compile sdk to 35
2 parents 42a4b5e + dd1cb61 commit f445ddf

File tree

3 files changed

+26
-38
lines changed

3 files changed

+26
-38
lines changed

build.gradle

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
id 'com.android.library'
33
id 'org.jetbrains.kotlin.android'
4-
id 'kotlin-kapt'
4+
id 'com.google.devtools.ksp'
55
}
66

77
android {
@@ -18,24 +18,20 @@ android {
1818
}
1919
}
2020
namespace 'com.brave.playlist'
21-
compileSdk 34
21+
compileSdk 35
2222

2323
buildFeatures {
2424
buildConfig = true
2525
}
2626

2727
defaultConfig {
2828
minSdk 24
29-
targetSdk 34
30-
versionCode 1
31-
versionName '0.0.1'
29+
targetSdk 35
3230
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
3331
consumerProguardFiles "consumer-rules.pro"
3432
vectorDrawables.useSupportLibrary = true
35-
kapt {
36-
arguments {
37-
arg("room.schemaLocation", "$projectDir/schemas")
38-
}
33+
ksp {
34+
arg("room.schemaLocation", "$projectDir/schemas")
3935
}
4036
}
4137

@@ -51,28 +47,25 @@ android {
5147
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
5248
signingConfig signingConfigs.release
5349
}
54-
debug {
55-
debuggable true
56-
}
5750
}
5851
compileOptions {
59-
sourceCompatibility JavaVersion.VERSION_1_8
60-
targetCompatibility JavaVersion.VERSION_1_8
52+
sourceCompatibility JavaVersion.VERSION_17
53+
targetCompatibility JavaVersion.VERSION_17
6154
}
6255
kotlinOptions {
63-
jvmTarget = '1.8'
56+
jvmTarget = '17'
6457
}
6558
}
6659

6760
ext {
6861
exoplayerVersion = '1.0.2' // using 1.0.2 version to align with chromium dependency
69-
room_version = "2.6.0"
62+
room_version = "2.6.1"
7063
}
7164

7265
dependencies {
73-
implementation 'androidx.core:core-ktx:1.12.0'
74-
implementation 'androidx.appcompat:appcompat:1.6.1'
75-
implementation 'com.google.android.material:material:1.10.0'
66+
implementation 'androidx.core:core-ktx:1.13.1'
67+
implementation 'androidx.appcompat:appcompat:1.7.0'
68+
implementation 'com.google.android.material:material:1.12.0'
7669
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
7770

7871
//noinspection GradleDependency
@@ -86,7 +79,7 @@ dependencies {
8679
//noinspection GradleDependency
8780
implementation "androidx.media3:media3-exoplayer-hls:$exoplayerVersion"
8881

89-
implementation "com.google.android.gms:play-services-cast-framework:21.3.0"
82+
implementation "com.google.android.gms:play-services-cast-framework:21.5.0"
9083

9184
implementation "androidx.preference:preference-ktx:1.2.1"
9285

@@ -95,13 +88,20 @@ dependencies {
9588
implementation "androidx.room:room-runtime:$room_version"
9689
annotationProcessor "androidx.room:room-compiler:$room_version"
9790
//noinspection KaptUsageInsteadOfKsp
98-
kapt "androidx.room:room-compiler:$room_version"
91+
// kapt "androidx.room:room-compiler:$room_version"
92+
ksp "androidx.room:room-compiler:$room_version"
9993

100-
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2'
94+
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.6'
10195

102-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4'
96+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3'
10397

10498
implementation "com.github.bumptech.glide:glide:4.12.0"
10599
testImplementation 'junit:junit:4.13.2'
106-
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
100+
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
101+
}
102+
103+
java {
104+
toolchain {
105+
languageVersion = JavaLanguageVersion.of(17)
106+
}
107107
}

src/main/java/com/brave/playlist/slidingpanel/SlidingPanelLayout.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import android.view.ViewGroup
2626
import android.view.accessibility.AccessibilityEvent
2727
import android.view.animation.Interpolator
2828
import androidx.core.content.res.ResourcesCompat
29-
import androidx.core.view.ViewCompat
3029
import com.brave.playlist.R
3130
import java.util.concurrent.CopyOnWriteArrayList
3231
import kotlin.math.abs
@@ -167,7 +166,6 @@ class BottomPanelLayout @JvmOverloads constructor(
167166
)
168167
} == true) {
169168
setAllChildrenVisible()
170-
ViewCompat.postInvalidateOnAnimation(this)
171169
}
172170
}
173171

@@ -724,7 +722,6 @@ class BottomPanelLayout @JvmOverloads constructor(
724722
mDragHelper?.abort()
725723
return
726724
}
727-
ViewCompat.postInvalidateOnAnimation(this)
728725
}
729726
}
730727

src/main/java/com/brave/playlist/view/PlaylistToolbar.kt

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ class PlaylistToolbar(context: Context, attrs: AttributeSet?, defStyleAttr: Int,
3535
private val ivMoveItem: AppCompatImageView
3636
private val ivDeleteItem: AppCompatImageView
3737

38-
private val defaultStatusBarColor: Int
39-
4038
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : this(
4139
context,
4240
attrs,
@@ -108,11 +106,6 @@ class PlaylistToolbar(context: Context, attrs: AttributeSet?, defStyleAttr: Int,
108106
ivDeleteItem = layoutEditToolbar.findViewById(R.id.ivDeleteItem)
109107
tvItemSelected.text = context.getString(R.string.playlist_number_selected, 0)
110108

111-
defaultStatusBarColor = if (context is AppCompatActivity)
112-
context.window.statusBarColor
113-
else
114-
0
115-
116109
if (requireDarkMode) {
117110
tvTitleToolbarPlaylist.setTextColor(getColor(android.R.color.white))
118111
ivBackToolbarPlaylist.setColorFilter(getColor(android.R.color.white))
@@ -130,15 +123,13 @@ class PlaylistToolbar(context: Context, attrs: AttributeSet?, defStyleAttr: Int,
130123
fun enableEditMode(enable: Boolean) {
131124
layoutMainToolbar.visibility = if (enable) GONE else VISIBLE
132125
layoutEditToolbar.visibility = if (enable) VISIBLE else GONE
133-
setStatusBarInEditMode(enable)
126+
setStatusBarInEditMode()
134127
}
135128

136-
private fun setStatusBarInEditMode(editMode: Boolean) {
129+
private fun setStatusBarInEditMode() {
137130
if (context is AppCompatActivity) {
138131
val activity = context as AppCompatActivity
139132
activity.window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
140-
activity.window.statusBarColor =
141-
if (editMode) getColor(R.color.edit_toolbar) else defaultStatusBarColor
142133
}
143134
}
144135

0 commit comments

Comments
 (0)