[pve-devel] [PATCH pve_flutter_frontend] chore: android: update `compileSdkVersion` to 36 and update AGP version
Shan Shaji
s.shaji at proxmox.com
Mon Jul 7 11:48:00 CEST 2025
Set `targetSdkVersion` and `compileSdkVersion` to (36).
According to android docs [0] the `targetSdkVersion` should be
<= `compileSdkVersion`.
Also update the Gradle and AGP versions [1] to support the new
API level.
[0] - https://developer.android.com/build#android_sdk_settings
[1] - https://developer.android.com/build/releases/gradle-plugin#api-level-support
Signed-off-by: Shan Shaji <s.shaji at proxmox.com>
---
The `biometric_storage` plugin works well when testing it in
Android 16 (Emulator). The plugins
(shared_preference [0], path_provider [1], url_launcher [2]) all uses
the compileSdkVersion version of flutter v3.29 which is less than 36.
Also the `flutter_inappwebview` [3] is using the compileSdkVersion (34).
The flutter default compileSdkVersion version can be found at
`packages/flutter_tools/gradle/src/main/groovy/flutter.groovy` which
is less than 36 on v3.29. Also the above groovy script also has a
condition to check if the plugin `compileSdkVersion` is greater than
`compileSdkVersion` of the App. Flutter will throw error or
suggestions for fixing if the `compileSdkVersion` of plugin is
greater than the app `compileSdkVersion`.
Also the API level changes are forward compatible [4], means even if
the plugin is compiled with the API level (35).
It will work with the new API level (36) as it does include changes
from API level 35 as well.
The above findings resulted in updating both the `targetSdkVersion`
and `compileSdkVersion` to 36.
[0] - https://github.com/flutter/packages/blob/2c52f245e232d6722530e5538bc61b12e5cbf6cd/packages/shared_preferences/shared_preferences_android/android/build.gradle#L37
[1] - https://github.com/flutter/packages/blob/2c52f245e232d6722530e5538bc61b12e5cbf6cd/packages/path_provider/path_provider_android/android/build.gradle#L26
[2] - https://github.com/flutter/packages/blob/2c52f245e232d6722530e5538bc61b12e5cbf6cd/packages/url_launcher/url_launcher_android/android/build.gradle#L29
[3] - https://github.com/pichillilorenzo/flutter_inappwebview/blob/0aaf7a0bfc01d61a4d1453cefb57fb6783b6e676/flutter_inappwebview_android/android/build.gradle#L29
[4] - https://developer.android.com/guide/topics/manifest/uses-sdk-element#fc
android/app/build.gradle | 2 +-
android/gradle/wrapper/gradle-wrapper.properties | 2 +-
android/settings.gradle | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/android/app/build.gradle b/android/app/build.gradle
index a749e46..9892795 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -44,7 +44,7 @@ def keystoreSecret = System.getenv('PROXMOX_APP_KEYSTORE_SECRET')
: keystoreProperties['keyPassword']
android {
- compileSdkVersion 35
+ compileSdkVersion 36
namespace "com.proxmox.app.pve_flutter_frontend"
sourceSets {
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
index 90d1364..78a7bc3 100644
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Mon Apr 24 14:18:06 CEST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/android/settings.gradle b/android/settings.gradle
index 1da49ad..97c4ee8 100644
--- a/android/settings.gradle
+++ b/android/settings.gradle
@@ -18,7 +18,7 @@ pluginManagement {
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
- id "com.android.application" version "8.7.0" apply false
+ id "com.android.application" version '8.9.1' apply false
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
}
--
2.39.5
More information about the pve-devel
mailing list