chore(mobile): upgrade gradle (#13901)

* chore(mobile): upgrade gradle

* update photo_manager

* migrate from kapt to ksp

pumps kotlin and other dependency version to fix build issues

* increase java heap size

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
pull/13935/head
Alex 2024-11-05 10:34:24 +07:00 committed by GitHub
parent d456d35510
commit b36de7d7d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
21 changed files with 69 additions and 56 deletions

@ -2,7 +2,7 @@ plugins {
id "com.android.application" id "com.android.application"
id "kotlin-android" id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin" id "dev.flutter.flutter-gradle-plugin"
id "kotlin-kapt" id 'com.google.devtools.ksp'
} }
def localProperties = new Properties() def localProperties = new Properties()
@ -31,12 +31,13 @@ android {
compileSdkVersion 34 compileSdkVersion 34
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_17
coreLibraryDesugaringEnabled true
} }
kotlinOptions { kotlinOptions {
jvmTarget = '1.8' jvmTarget = '17'
} }
sourceSets { sourceSets {
@ -74,6 +75,7 @@ android {
signingConfig signingConfigs.release signingConfig signingConfigs.release
} }
} }
namespace 'app.alextran.immich'
} }
flutter { flutter {
@ -81,11 +83,11 @@ flutter {
} }
dependencies { dependencies {
def kotlin_version = '1.9.24' def kotlin_version = '2.0.20'
def kotlin_coroutines_version = '1.8.1' def kotlin_coroutines_version = '1.9.0'
def work_version = '2.9.0' def work_version = '2.9.1'
def concurrent_version = '1.1.0' def concurrent_version = '1.2.0'
def guava_version = '33.2.0-android' def guava_version = '33.3.1-android'
def glide_version = '4.16.0' def glide_version = '4.16.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
@ -94,7 +96,8 @@ dependencies {
implementation "androidx.concurrent:concurrent-futures:$concurrent_version" implementation "androidx.concurrent:concurrent-futures:$concurrent_version"
implementation "com.google.guava:guava:$guava_version" implementation "com.google.guava:guava:$guava_version"
implementation "com.github.bumptech.glide:glide:$glide_version" implementation "com.github.bumptech.glide:glide:$glide_version"
kapt "com.github.bumptech.glide:compiler:$glide_version" ksp "com.github.bumptech.glide:ksp:$glide_version"
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.2'
} }
// This is uncommented in F-Droid build script // This is uncommented in F-Droid build script

@ -1,6 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="app.alextran.immich"> <manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Flutter needs it to communicate with the running application <!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc. to allow setting breakpoints, to provide hot reload, etc.
--> -->
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
</manifest> </manifest>

@ -1,4 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="app.alextran.immich" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"> xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />

@ -1,6 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="app.alextran.immich"> <manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Flutter needs it to communicate with the running application <!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc. to allow setting breakpoints, to provide hot reload, etc.
--> -->
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
</manifest> </manifest>

@ -1,5 +1,5 @@
allprojects { allprojects {
ext.kotlin_version = '1.9.24' ext.kotlin_version = '2.0.20'
repositories { repositories {
google() google()

@ -1,3 +1,5 @@
org.gradle.jvmargs=-Xmx1536M org.gradle.jvmargs=-Xmx4096M
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false

@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-all.zip
distributionSha256Sum=fe696c020f241a5f69c30f763c5a7f38eec54b490db19cd2b0962dda420d7d12

@ -18,9 +18,9 @@ pluginManagement {
plugins { plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0" id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.4.2" apply false id "com.android.application" version '8.7.2' apply false
id "org.jetbrains.kotlin.android" version "1.9.0" apply false id "org.jetbrains.kotlin.android" version "2.0.20" apply false
id "org.jetbrains.kotlin.kapt" version "1.9.0" apply false id 'com.google.devtools.ksp' version '2.0.20-1.0.24' apply false
} }
include ":app" include ":app"

@ -131,7 +131,7 @@ const AlbumSchema = CollectionSchema(
getId: _albumGetId, getId: _albumGetId,
getLinks: _albumGetLinks, getLinks: _albumGetLinks,
attach: _albumAttach, attach: _albumAttach,
version: '3.1.0+1', version: '3.1.8',
); );
int _albumEstimateSize( int _albumEstimateSize(

@ -49,7 +49,7 @@ const AndroidDeviceAssetSchema = CollectionSchema(
getId: _androidDeviceAssetGetId, getId: _androidDeviceAssetGetId,
getLinks: _androidDeviceAssetGetLinks, getLinks: _androidDeviceAssetGetLinks,
attach: _androidDeviceAssetAttach, attach: _androidDeviceAssetAttach,
version: '3.1.0+1', version: '3.1.8',
); );
int _androidDeviceAssetEstimateSize( int _androidDeviceAssetEstimateSize(

@ -180,7 +180,7 @@ const AssetSchema = CollectionSchema(
getId: _assetGetId, getId: _assetGetId,
getLinks: _assetGetLinks, getLinks: _assetGetLinks,
attach: _assetAttach, attach: _assetAttach,
version: '3.1.0+1', version: '3.1.8',
); );
int _assetEstimateSize( int _assetEstimateSize(

@ -45,7 +45,7 @@ const BackupAlbumSchema = CollectionSchema(
getId: _backupAlbumGetId, getId: _backupAlbumGetId,
getLinks: _backupAlbumGetLinks, getLinks: _backupAlbumGetLinks,
attach: _backupAlbumAttach, attach: _backupAlbumAttach,
version: '3.1.0+1', version: '3.1.8',
); );
int _backupAlbumEstimateSize( int _backupAlbumEstimateSize(

@ -34,7 +34,7 @@ const DuplicatedAssetSchema = CollectionSchema(
getId: _duplicatedAssetGetId, getId: _duplicatedAssetGetId,
getLinks: _duplicatedAssetGetLinks, getLinks: _duplicatedAssetGetLinks,
attach: _duplicatedAssetAttach, attach: _duplicatedAssetAttach,
version: '3.1.0+1', version: '3.1.8',
); );
int _duplicatedAssetEstimateSize( int _duplicatedAssetEstimateSize(

@ -58,7 +58,7 @@ const ETagSchema = CollectionSchema(
getId: _eTagGetId, getId: _eTagGetId,
getLinks: _eTagGetLinks, getLinks: _eTagGetLinks,
attach: _eTagAttach, attach: _eTagAttach,
version: '3.1.0+1', version: '3.1.8',
); );
int _eTagEstimateSize( int _eTagEstimateSize(

@ -109,7 +109,7 @@ const ExifInfoSchema = CollectionSchema(
getId: _exifInfoGetId, getId: _exifInfoGetId,
getLinks: _exifInfoGetLinks, getLinks: _exifInfoGetLinks,
attach: _exifInfoAttach, attach: _exifInfoAttach,
version: '3.1.0+1', version: '3.1.8',
); );
int _exifInfoEstimateSize( int _exifInfoEstimateSize(

@ -66,7 +66,7 @@ const IOSDeviceAssetSchema = CollectionSchema(
getId: _iOSDeviceAssetGetId, getId: _iOSDeviceAssetGetId,
getLinks: _iOSDeviceAssetGetLinks, getLinks: _iOSDeviceAssetGetLinks,
attach: _iOSDeviceAssetAttach, attach: _iOSDeviceAssetAttach,
version: '3.1.0+1', version: '3.1.8',
); );
int _iOSDeviceAssetEstimateSize( int _iOSDeviceAssetEstimateSize(

@ -60,7 +60,7 @@ const LoggerMessageSchema = CollectionSchema(
getId: _loggerMessageGetId, getId: _loggerMessageGetId,
getLinks: _loggerMessageGetLinks, getLinks: _loggerMessageGetLinks,
attach: _loggerMessageAttach, attach: _loggerMessageAttach,
version: '3.1.0+1', version: '3.1.8',
); );
int _loggerMessageEstimateSize( int _loggerMessageEstimateSize(

@ -39,7 +39,7 @@ const StoreValueSchema = CollectionSchema(
getId: _storeValueGetId, getId: _storeValueGetId,
getLinks: _storeValueGetLinks, getLinks: _storeValueGetLinks,
attach: _storeValueAttach, attach: _storeValueAttach,
version: '3.1.0+1', version: '3.1.8',
); );
int _storeValueEstimateSize( int _storeValueEstimateSize(

@ -129,7 +129,7 @@ const UserSchema = CollectionSchema(
getId: _userGetId, getId: _userGetId,
getLinks: _userGetLinks, getLinks: _userGetLinks,
attach: _userAttach, attach: _userAttach,
version: '3.1.0+1', version: '3.1.8',
); );
int _userEstimateSize( int _userEstimateSize(

@ -548,10 +548,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: flutter_local_notifications name: flutter_local_notifications
sha256: dd6676d8c2926537eccdf9f72128bbb2a9d0814689527b17f92c248ff192eaf3 sha256: "674173fd3c9eda9d4c8528da2ce0ea69f161577495a9cc835a2a4ecd7eadeb35"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "17.2.1+2" version: "17.2.4"
flutter_local_notifications_linux: flutter_local_notifications_linux:
dependency: transitive dependency: transitive
description: description:
@ -876,26 +876,26 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: isar name: isar
sha256: "99165dadb2cf2329d3140198363a7e7bff9bbd441871898a87e26914d25cf1ea" sha256: e17a9555bc7f22ff26568b8c64d019b4ffa2dc6bd4cb1c8d9b269aefd32e53ad
url: "https://pub.dev" url: "https://pub.isar-community.dev"
source: hosted source: hosted
version: "3.1.0+1" version: "3.1.8"
isar_flutter_libs: isar_flutter_libs:
dependency: "direct main" dependency: "direct main"
description: description:
name: isar_flutter_libs name: isar_flutter_libs
sha256: bc6768cc4b9c61aabff77152e7f33b4b17d2fc93134f7af1c3dd51500fe8d5e8 sha256: "78710781e658ce4bff59b3f38c5b2735e899e627f4e926e1221934e77b95231a"
url: "https://pub.dev" url: "https://pub.isar-community.dev"
source: hosted source: hosted
version: "3.1.0+1" version: "3.1.8"
isar_generator: isar_generator:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: isar_generator name: isar_generator
sha256: "76c121e1295a30423604f2f819bc255bc79f852f3bc8743a24017df6068ad133" sha256: "484e73d3b7e81dbd816852fe0b9497333118a9aeb646fd2d349a62cc8980ffe1"
url: "https://pub.dev" url: "https://pub.isar-community.dev"
source: hosted source: hosted
version: "3.1.0+1" version: "3.1.8"
js: js:
dependency: transitive dependency: transitive
description: description:
@ -1211,10 +1211,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: photo_manager name: photo_manager
sha256: "70159eee32203e8162d49d588232f0299ed3f383c63eef1e899cb6b83dee6b26" sha256: f5ef2618870e9a50d8bfeb81a02c242d580ae8614bd5ea9e1b80dbb7e49d4260
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.5.1" version: "3.6.1"
photo_manager_image_provider: photo_manager_image_provider:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1712,18 +1712,18 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: video_player name: video_player
sha256: e30df0d226c4ef82e2c150ebf6834b3522cf3f654d8e2f9419d376cdc071425d sha256: "4a8c3492d734f7c39c2588a3206707a05ee80cef52e8c7f3b2078d430c84bc17"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.9.1" version: "2.9.2"
video_player_android: video_player_android:
dependency: transitive dependency: transitive
description: description:
name: video_player_android name: video_player_android
sha256: "4de50df9ee786f5891d3281e1e633d7b142ef1acf47392592eb91cba5d355849" sha256: "391e092ba4abe2f93b3e625bd6b6a6ec7d7414279462c1c0ee42b5ab8d0a0898"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.6.0" version: "2.7.16"
video_player_avfoundation: video_player_avfoundation:
dependency: transitive dependency: transitive
description: description:

@ -8,12 +8,14 @@ environment:
sdk: '>=3.3.0 <4.0.0' sdk: '>=3.3.0 <4.0.0'
flutter: 3.24.4 flutter: 3.24.4
isar_version: &isar_version 3.1.8 # define the version to be used
dependencies: dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
path_provider_ios: path_provider_ios:
photo_manager: ^3.5.1 photo_manager: ^3.6.1
photo_manager_image_provider: ^2.2.0 photo_manager_image_provider: ^2.2.0
flutter_hooks: ^0.20.4 flutter_hooks: ^0.20.4
hooks_riverpod: ^2.4.9 hooks_riverpod: ^2.4.9
@ -23,7 +25,7 @@ dependencies:
intl: ^0.19.0 intl: ^0.19.0
auto_route: ^9.2.0 auto_route: ^9.2.0
fluttertoast: ^8.2.4 fluttertoast: ^8.2.4
video_player: ^2.8.2 video_player: ^2.9.2
chewie: ^1.7.4 chewie: ^1.7.4
socket_io_client: ^2.0.3+1 socket_io_client: ^2.0.3+1
maplibre_gl: 0.19.0+2 maplibre_gl: 0.19.0+2
@ -44,8 +46,12 @@ dependencies:
http_parser: ^4.0.2 http_parser: ^4.0.2
flutter_web_auth: ^0.6.0 flutter_web_auth: ^0.6.0
easy_image_viewer: ^1.4.0 easy_image_viewer: ^1.4.0
isar: ^3.1.0+1 isar:
isar_flutter_libs: ^3.1.0+1 version: *isar_version
hosted: https://pub.isar-community.dev/
isar_flutter_libs: # contains Isar Core
version: *isar_version
hosted: https://pub.isar-community.dev/
permission_handler: ^11.2.0 permission_handler: ^11.2.0
device_info_plus: ^11.0.0 device_info_plus: ^11.0.0
connectivity_plus: ^6.0.0 connectivity_plus: ^6.0.0
@ -92,7 +98,9 @@ dev_dependencies:
auto_route_generator: ^9.0.0 auto_route_generator: ^9.0.0
flutter_launcher_icons: ^0.14.0 flutter_launcher_icons: ^0.14.0
flutter_native_splash: ^2.3.9 flutter_native_splash: ^2.3.9
isar_generator: ^3.1.0+1 isar_generator:
version: *isar_version
hosted: https://pub.isar-community.dev/
integration_test: integration_test:
sdk: flutter sdk: flutter
custom_lint: ^0.6.4 custom_lint: ^0.6.4