From cb1dacee49349a5dceb3fc9dfc87fcb439cdbb97 Mon Sep 17 00:00:00 2001 From: Ahmad-alnahal Date: Sun, 8 Nov 2026 16:22:08 +0200 Subject: [PATCH] Update Android build to target API 36 with current Flutter Migrate Gradle to declarative plugins (AGP 9.1.0, Gradle 9.3.1, Kotlin 2.4.0, Java 17), compile/target SDK 36, minSdk 24. Upgrade or replace plugins without namespace or with outdated Kotlin settings, migrate webview_flutter to v4, fix l10n placeholders for current gen-l10n, and add a bottom SafeArea to action sheets for edge-to-edge. --- .gitignore | 3 + android/app/build.gradle | 51 +- android/app/src/debug/AndroidManifest.xml | 3 +- android/app/src/main/AndroidManifest.xml | 3 +- android/app/src/profile/AndroidManifest.xml | 3 +- android/build.gradle | 15 +- android/gradle.properties | 2 + .../gradle/wrapper/gradle-wrapper.properties | 2 +- android/settings.gradle | 30 +- lib/app.dart | 2 +- lib/home.dart | 6 +- lib/l10n/intl_en.arb | 6 +- lib/models/auth.dart | 4 +- lib/models/theme.dart | 70 +- lib/screens/bb_commits.dart | 2 +- lib/screens/bb_explore.dart | 2 +- lib/screens/bb_issue_comment.dart | 2 +- lib/screens/bb_issue_form.dart | 2 +- lib/screens/bb_issues.dart | 2 +- lib/screens/bb_pulls.dart | 2 +- lib/screens/bb_repo.dart | 2 +- lib/screens/bb_teams.dart | 2 +- lib/screens/code_theme.dart | 2 +- lib/screens/ge_blob.dart | 2 +- lib/screens/ge_commits.dart | 2 +- lib/screens/ge_contributors.dart | 2 +- lib/screens/ge_files.dart | 2 +- lib/screens/ge_issue_comment.dart | 2 +- lib/screens/ge_issue_form.dart | 2 +- lib/screens/ge_repo.dart | 2 +- lib/screens/ge_search.dart | 2 +- lib/screens/ge_tree.dart | 2 +- lib/screens/gh_commit.dart | 2 +- lib/screens/gh_commits.dart | 2 +- lib/screens/gh_compare.dart | 2 +- lib/screens/gh_contributors.dart | 2 +- lib/screens/gh_events.dart | 2 +- lib/screens/gh_files.dart | 2 +- lib/screens/gh_gists.dart | 2 +- lib/screens/gh_gists_files.dart | 2 +- lib/screens/gh_issue_form.dart | 2 +- lib/screens/gh_issues.dart | 2 +- lib/screens/gh_news.dart | 2 +- lib/screens/gh_notification.dart | 2 +- lib/screens/gh_pulls.dart | 2 +- lib/screens/gh_repo.dart | 2 +- lib/screens/gh_search.dart | 2 +- lib/screens/gh_trending.dart | 2 +- lib/screens/gh_user.dart | 18 +- lib/screens/gl_commit.dart | 2 +- lib/screens/gl_commits.dart | 2 +- lib/screens/gl_explore.dart | 2 +- lib/screens/gl_group.dart | 2 +- lib/screens/gl_groups.dart | 2 +- lib/screens/gl_issue.dart | 2 +- lib/screens/gl_issue_form.dart | 2 +- lib/screens/gl_issues.dart | 2 +- lib/screens/gl_members.dart | 2 +- lib/screens/gl_merge_requests.dart | 2 +- lib/screens/gl_project.dart | 2 +- lib/screens/gl_project_activity.dart | 2 +- lib/screens/gl_search.dart | 2 +- lib/screens/gl_starrers.dart | 2 +- lib/screens/gl_tree.dart | 2 +- lib/screens/gl_user.dart | 2 +- lib/screens/go_commits.dart | 2 +- lib/screens/go_issues.dart | 2 +- lib/screens/go_object.dart | 2 +- lib/screens/go_orgs.dart | 2 +- lib/screens/go_repo.dart | 2 +- lib/screens/gt_commits.dart | 2 +- lib/screens/gt_issue_comment.dart | 2 +- lib/screens/gt_issue_form.dart | 2 +- lib/screens/gt_issues.dart | 2 +- lib/screens/gt_object.dart | 2 +- lib/screens/gt_orgs.dart | 2 +- lib/screens/gt_repo.dart | 2 +- lib/screens/gt_status.dart | 2 +- lib/screens/login.dart | 2 +- lib/screens/settings.dart | 10 +- lib/widgets/event_item.dart | 2 +- lib/widgets/html_view.dart | 64 +- lib/widgets/release_item.dart | 2 +- lib/widgets/timeline_item.dart | 2 +- pubspec.lock | 927 +++++++++++------- pubspec.yaml | 22 +- 86 files changed, 792 insertions(+), 583 deletions(-) diff --git a/.gitignore b/.gitignore index 1880f51f..7146afe3 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,6 @@ app.*.map.json /android/app/release packages/*/pubspec.lock + +# Generated by flutter gen-l10n +/lib/l10n/S*.dart diff --git a/android/app/build.gradle b/android/app/build.gradle index 3f2bdc37..24d0b0d0 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,41 +1,22 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' +plugins { + id "com.android.application" + id "kotlin-android" + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + id "dev.flutter.flutter-gradle-plugin" } -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { - compileSdkVersion 32 // flutter.compileSdkVersion + namespace 'io.github.pd4d10.gittouch' + compileSdk flutter.compileSdkVersion ndkVersion flutter.ndkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = '17' } sourceSets { @@ -47,10 +28,10 @@ android { applicationId "io.github.pd4d10.gittouch" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. - minSdkVersion 19 // flutter.minSdkVersion - targetSdkVersion flutter.targetSdkVersion - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName + minSdk flutter.minSdkVersion + targetSdk flutter.targetSdkVersion + versionCode flutter.versionCode + versionName flutter.versionName } buildTypes { @@ -65,7 +46,3 @@ android { flutter { source '../..' } - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index 6f65144e..399f6981 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,4 @@ - +