Skip to content

Commit a5e8de7

Browse files
authored
Merge pull request #522 from firemaples/misc/upgrade-target-sdk-35
Update the target SDK to 35
2 parents 49e4edb + c5899be commit a5e8de7

4 files changed

Lines changed: 9 additions & 14 deletions

File tree

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.nav_version = "2.6.0" // require SDK 34 from 2.7.0
4+
ext.nav_version = "2.9.0" // require SDK 34 from 2.7.0
55
ext.hilt_version = "2.56.2"
66
ext.coroutines_version = "1.10.2"
7-
ext.lifecycle_version = "2.6.2"
7+
ext.lifecycle_version = "2.9.0"
88
ext.text_recognition_version = "16.0.1"
99
ext.kotpref_version = "2.13.2"
1010
ext.retrofit2_version = "3.0.0"

main/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ task ensureFiles {
2323
}
2424

2525
android {
26-
compileSdk 34
26+
compileSdk 35
2727

2828
defaultConfig {
2929
applicationId "tw.firemaples.onscreenocr"
3030
minSdkVersion 21
31-
targetSdkVersion 34
31+
targetSdkVersion 35
3232
versionCode 124
3333
versionName "4.0.6"
3434

@@ -111,7 +111,7 @@ dependencies {
111111

112112
implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
113113

114-
implementation 'androidx.core:core-ktx:1.10.1'
114+
implementation 'androidx.core:core-ktx:1.16.0'
115115
implementation 'androidx.appcompat:appcompat:1.7.0'
116116
implementation 'com.google.android.material:material:1.12.0'
117117
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
@@ -145,10 +145,10 @@ dependencies {
145145
androidTestImplementation "androidx.navigation:navigation-testing:$nav_version"
146146

147147
// required to avoid crash on Android 12 API 31
148-
implementation 'androidx.work:work-runtime-ktx:2.8.1'
148+
implementation 'androidx.work:work-runtime-ktx:2.10.1'
149149

150150
// Compose
151-
def composeBom = platform('androidx.compose:compose-bom:2024.12.01')
151+
def composeBom = platform('androidx.compose:compose-bom:2025.05.00')
152152
implementation composeBom
153153
androidTestImplementation composeBom
154154
// Material Design 3
@@ -239,7 +239,7 @@ dependencies {
239239
// implementation 'com.mopub.mediation:adcolony:4.5.0.1'
240240

241241
// Admob
242-
implementation 'com.google.android.gms:play-services-ads:22.6.0'
242+
implementation 'com.google.android.gms:play-services-ads:23.6.0'
243243
// Facebook Ad network
244244
implementation 'com.google.ads.mediation:facebook:6.19.0.0'
245245
// Adcolony Ad network

main/proguard-rules.pro

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,3 @@
7474
-if interface * { @retrofit2.http.* public *** *(...); }
7575
-keep,allowoptimization,allowshrinking,allowobfuscation class <3>
7676
##### Proguard2 End
77-
78-
##### Proguard R8
79-
-dontwarn android.media.LoudnessCodecController$OnLoudnessCodecUpdateListener
80-
-dontwarn android.media.LoudnessCodecController
81-
#####

main/src/main/java/tw/firemaples/onscreenocr/utils/BitmapCache.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ object BitmapCache {
8383
return false
8484
}
8585

86-
val targetConfig = config ?: this.config
86+
val targetConfig = config ?: this.config ?: return false
8787
val byteCount = width * height * targetConfig.getBytesPerPixel()
8888
return byteCount <= this.allocationByteCount
8989
}

0 commit comments

Comments
 (0)