From 13be271df7f14583750b9e3220d0830ac00f0d02 Mon Sep 17 00:00:00 2001
From: Fynn Petersen-Frey <10599762+fyfrey@users.noreply.github.com>
Date: Fri, 21 Apr 2023 12:31:44 +0200
Subject: [PATCH] chore(Android): update gradle, kotlin, configure glide
(#2306)
---
mobile/android/app/build.gradle | 3 +++
mobile/android/app/src/main/AndroidManifest.xml | 1 +
.../src/main/kotlin/com/example/mobile/AppGlideModule.kt | 7 +++++++
mobile/android/build.gradle | 5 +++--
mobile/android/gradle/wrapper/gradle-wrapper.properties | 5 ++---
5 files changed, 16 insertions(+), 5 deletions(-)
create mode 100644 mobile/android/app/src/main/kotlin/com/example/mobile/AppGlideModule.kt
diff --git a/mobile/android/app/build.gradle b/mobile/android/app/build.gradle
index 3d3435a2a..158a27208 100644
--- a/mobile/android/app/build.gradle
+++ b/mobile/android/app/build.gradle
@@ -23,6 +23,7 @@ if (flutterVersionName == null) {
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
+apply plugin: 'kotlin-kapt'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystoreProperties = new Properties()
@@ -86,4 +87,6 @@ dependencies {
implementation "androidx.work:work-runtime-ktx:$work_version"
implementation "androidx.concurrent:concurrent-futures:$concurrent_version"
implementation "com.google.guava:guava:$guava_version"
+ implementation "com.github.bumptech.glide:glide:$glide_version"
+ kapt "com.github.bumptech.glide:compiler:$glide_version"
}
diff --git a/mobile/android/app/src/main/AndroidManifest.xml b/mobile/android/app/src/main/AndroidManifest.xml
index fa10c7454..84e4acf77 100644
--- a/mobile/android/app/src/main/AndroidManifest.xml
+++ b/mobile/android/app/src/main/AndroidManifest.xml
@@ -59,6 +59,7 @@
+
diff --git a/mobile/android/app/src/main/kotlin/com/example/mobile/AppGlideModule.kt b/mobile/android/app/src/main/kotlin/com/example/mobile/AppGlideModule.kt
new file mode 100644
index 000000000..da43d1c26
--- /dev/null
+++ b/mobile/android/app/src/main/kotlin/com/example/mobile/AppGlideModule.kt
@@ -0,0 +1,7 @@
+package app.alextran.immich
+
+import com.bumptech.glide.annotation.GlideModule
+import com.bumptech.glide.module.AppGlideModule
+
+@GlideModule
+class AppGlideModule : AppGlideModule()
\ No newline at end of file
diff --git a/mobile/android/build.gradle b/mobile/android/build.gradle
index 6847fe261..07a2e912b 100644
--- a/mobile/android/build.gradle
+++ b/mobile/android/build.gradle
@@ -1,15 +1,16 @@
buildscript {
- ext.kotlin_version = '1.6.10'
+ ext.kotlin_version = '1.8.20'
ext.work_version = '2.7.1'
ext.concurrent_version = '1.1.0'
ext.guava_version = '31.0.1-android'
+ ext.glide_version = '4.14.2'
repositories {
google()
mavenCentral()
}
dependencies {
- classpath 'com.android.tools.build:gradle:7.1.2'
+ classpath 'com.android.tools.build:gradle:7.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
diff --git a/mobile/android/gradle/wrapper/gradle-wrapper.properties b/mobile/android/gradle/wrapper/gradle-wrapper.properties
index b06c5a3f1..98bcc01e4 100644
--- a/mobile/android/gradle/wrapper/gradle-wrapper.properties
+++ b/mobile/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,7 +1,6 @@
-#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
-distributionSha256Sum=cd5c2958a107ee7f0722004a12d0f8559b4564c34daad7df06cffd4d12a426d0
\ No newline at end of file
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
+distributionSha256Sum=518a863631feb7452b8f1b3dc2aaee5f388355cc3421bbd0275fbeadd77e84b2
\ No newline at end of file