From 506cb624334e79ac9f73188366f19960d1f2c806 Mon Sep 17 00:00:00 2001 From: David Luhmer Date: Wed, 26 Aug 2026 17:46:40 +0200 Subject: [PATCH 1/4] Raise minSdk from 21 to 23 Glide 5.0.9 declares minSdk 23, so the manifest merger refuses to build against it while we still claim API 21. AndroidX has moved to 23 as well, so this is where the dependency floor is heading anyway. Dropping API 21/22 drops Android 5.0 and 5.1. No code in the app guards on SDK_INT below 23, so nothing becomes dead with this change. Signed-off-by: David Luhmer --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 0e523f7df..5315dd941 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,7 +17,7 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -ANDROID_BUILD_MIN_SDK_VERSION=21 +ANDROID_BUILD_MIN_SDK_VERSION=23 ANDROID_BUILD_TARGET_SDK_VERSION=36 ANDROID_BUILD_SDK_VERSION=36 android.useAndroidX=true From 9f417384c97a2b167f340cadbbb05d3f255bd743 Mon Sep 17 00:00:00 2001 From: David Luhmer Date: Wed, 26 Aug 2026 17:46:48 +0200 Subject: [PATCH 2/4] Bump Glide to 5.0.9 and compile against SDK 37 Glide 5.0.9 sets minCompileSdk=37, so the AAR metadata check fails on compileSdk 36. AGP 9.1.0 builds against 37 fine but warns that it was only tested up to 36, hence the suppress flag; it can go once we move to an AGP that lists 37 as supported. targetSdk stays at 36, so runtime behaviour is unchanged. Signed-off-by: David Luhmer --- News-Android-App/build.gradle | 2 +- gradle.properties | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/News-Android-App/build.gradle b/News-Android-App/build.gradle index de171b776..e0161f9cb 100644 --- a/News-Android-App/build.gradle +++ b/News-Android-App/build.gradle @@ -115,7 +115,7 @@ repositories { } final DAGGER_VERSION = '2.59.2' -final GLIDE_VERSION = '5.0.7' +final GLIDE_VERSION = '5.0.9' final ESPRESSO_VERSION = '3.7.0' final OKHTTP_VERSION = '5.3.2' final MOCKITO_VERSION = '5.23.0' diff --git a/gradle.properties b/gradle.properties index 5315dd941..31ed996e0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -19,7 +19,7 @@ ANDROID_BUILD_MIN_SDK_VERSION=23 ANDROID_BUILD_TARGET_SDK_VERSION=36 -ANDROID_BUILD_SDK_VERSION=36 +ANDROID_BUILD_SDK_VERSION=37 android.useAndroidX=true android.enableJetifier=true org.gradle.dependency.verification.console=verbose @@ -34,3 +34,4 @@ android.r8.strictFullModeForKeepRules=true android.r8.optimizedResourceShrinking=true android.builtInKotlin=true android.newDsl=true +android.suppressUnsupportedCompileSdk=37.0 From a1fdfaf3fade07948c8aa253d65a26867d10ee05 Mon Sep 17 00:00:00 2001 From: David Luhmer Date: Wed, 26 Aug 2026 17:46:58 +0200 Subject: [PATCH 3/4] Decode bitmaps through the platform ImageDecoder Glide 5.0.8 recommends switching to Android's ImageDecoder on API 29+ and fixed the OOM/ANR and unbounded-allocation bugs that made the option unsafe before, so 5.0.9 is the first release where turning it on makes sense. Glide keeps using BitmapFactory below API 29 by itself. setUriImageDecoderEnabled lets local Uris be decoded directly instead of through an InputStream wrapper, which is the path the notification thumbnails take. Hardware-bitmap gating is shared with the BitmapFactory path (DefaultOnHeaderDecodedListener honours ALLOW_HARDWARE_CONFIG), so the Palette call in FavIconHandler keeps getting a readable bitmap. setUseArrayPoolForImageDecoderByteBufferAllocation is deliberately left off: that is the allocation path 5.0.8 had to fix, and it only saves a double allocation. Signed-off-by: David Luhmer --- .../owncloudnewsreader/helper/NextcloudGlideModule.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/helper/NextcloudGlideModule.kt b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/helper/NextcloudGlideModule.kt index a7c980289..398d7e1c5 100644 --- a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/helper/NextcloudGlideModule.kt +++ b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/helper/NextcloudGlideModule.kt @@ -46,6 +46,13 @@ class NextcloudGlideModule : AppGlideModule() { builder.setDiskCache(InternalCacheDiskCacheFactory(context, diskCacheSizeBytes.toLong())) // builder.setDiskCache(ExternalPreferredCacheDiskCacheFactory(context)) + // Decode bitmaps through Android's ImageDecoder (API 29+) instead of BitmapFactory. + // It is the platform's preferred decoder and usually needs less memory. Glide falls back + // to BitmapFactory on older releases on its own, so no version check is needed here. + builder.setImageDecoderEnabledForBitmaps(true) + // Let ImageDecoder read local Uris directly instead of going through an InputStream. + builder.setUriImageDecoderEnabled(true) + // #00ff00 Memory Cache (Green) // #0066ff Disk Cache (Blue) // #ff0000 Remote (Red) From ef75b62f88456a06eb05f2c80c199dec4843a348 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 9 Oct 2026 08:21:26 +0000 Subject: [PATCH 4/4] Bump AGP to 9.1.1 so compileSdk 37 resolves to android-37.0 Glide 5.0.9 declares minCompileSdk=37 (minor 0) in its AAR metadata, so compileSdk cannot go back to 36. API 37 is published as the platform package platforms;android-37.0, but AGP 9.1.0 predates it and looks up the target hash 'android-37'. The SDK manager installs android-37.0, and then the APK, lint and CodeQL jobs fail with "Failed to find target with hash string 'android-37'". AGP 9.1.1 is the first release that supports API 37.0 and maps compileSdk = 37 to android-37.0, so the suppressUnsupportedCompileSdk override is no longer needed. Gradle 9.4.1 meets its minimum of 9.3.1. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Ag6nGZB7KqbF3K9fhg98vJ Signed-off-by: Claude --- build.gradle | 2 +- gradle.properties | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 553cee4c9..0fdcd6f0d 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ buildscript { gradlePluginPortal() } dependencies { - classpath 'com.android.tools.build:gradle:9.1.0' + classpath 'com.android.tools.build:gradle:9.1.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/gradle.properties b/gradle.properties index 31ed996e0..4689069a3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -34,4 +34,3 @@ android.r8.strictFullModeForKeepRules=true android.r8.optimizedResourceShrinking=true android.builtInKotlin=true android.newDsl=true -android.suppressUnsupportedCompileSdk=37.0