diff --git a/build.gradle b/build.gradle index 37c36224..81dcb03f 100644 --- a/build.gradle +++ b/build.gradle @@ -1,10 +1,10 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.nav_version = "2.6.0" // require SDK 34 from 2.7.0 + ext.nav_version = "2.9.0" // require SDK 34 from 2.7.0 ext.hilt_version = "2.56.2" ext.coroutines_version = "1.10.2" - ext.lifecycle_version = "2.6.2" + ext.lifecycle_version = "2.9.0" ext.text_recognition_version = "16.0.1" ext.kotpref_version = "2.13.2" ext.retrofit2_version = "3.0.0" diff --git a/main/build.gradle b/main/build.gradle index 62228632..ad2ea37c 100644 --- a/main/build.gradle +++ b/main/build.gradle @@ -23,12 +23,12 @@ task ensureFiles { } android { - compileSdk 34 + compileSdk 35 defaultConfig { applicationId "tw.firemaples.onscreenocr" minSdkVersion 21 - targetSdkVersion 34 + targetSdkVersion 35 versionCode 124 versionName "4.0.6" @@ -111,7 +111,7 @@ dependencies { implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs') - implementation 'androidx.core:core-ktx:1.10.1' + implementation 'androidx.core:core-ktx:1.16.0' implementation 'androidx.appcompat:appcompat:1.7.0' implementation 'com.google.android.material:material:1.12.0' implementation 'androidx.constraintlayout:constraintlayout:2.2.1' @@ -145,10 +145,10 @@ dependencies { androidTestImplementation "androidx.navigation:navigation-testing:$nav_version" // required to avoid crash on Android 12 API 31 - implementation 'androidx.work:work-runtime-ktx:2.8.1' + implementation 'androidx.work:work-runtime-ktx:2.10.1' // Compose - def composeBom = platform('androidx.compose:compose-bom:2024.12.01') + def composeBom = platform('androidx.compose:compose-bom:2025.05.00') implementation composeBom androidTestImplementation composeBom // Material Design 3 @@ -239,7 +239,7 @@ dependencies { // implementation 'com.mopub.mediation:adcolony:4.5.0.1' // Admob - implementation 'com.google.android.gms:play-services-ads:22.6.0' + implementation 'com.google.android.gms:play-services-ads:23.6.0' // Facebook Ad network implementation 'com.google.ads.mediation:facebook:6.19.0.0' // Adcolony Ad network diff --git a/main/proguard-rules.pro b/main/proguard-rules.pro index d220f7b1..0ada610a 100644 --- a/main/proguard-rules.pro +++ b/main/proguard-rules.pro @@ -74,8 +74,3 @@ -if interface * { @retrofit2.http.* public *** *(...); } -keep,allowoptimization,allowshrinking,allowobfuscation class <3> ##### Proguard2 End - -##### Proguard R8 --dontwarn android.media.LoudnessCodecController$OnLoudnessCodecUpdateListener --dontwarn android.media.LoudnessCodecController -##### diff --git a/main/src/main/java/tw/firemaples/onscreenocr/utils/BitmapCache.kt b/main/src/main/java/tw/firemaples/onscreenocr/utils/BitmapCache.kt index 7f8d949a..2ee33a5b 100644 --- a/main/src/main/java/tw/firemaples/onscreenocr/utils/BitmapCache.kt +++ b/main/src/main/java/tw/firemaples/onscreenocr/utils/BitmapCache.kt @@ -83,7 +83,7 @@ object BitmapCache { return false } - val targetConfig = config ?: this.config + val targetConfig = config ?: this.config ?: return false val byteCount = width * height * targetConfig.getBytesPerPixel() return byteCount <= this.allocationByteCount }