Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Update Android build configuration: enable core library desugaring, increase minSdkVersion to 22, and upgrade Gradle version to 8.4. Add ProGuard rules to suppress warnings.

AmanRajSinghMourya0a3035e5d54b
diff --git a/mobile/apps/auth/android/app/build.gradle b/mobile/apps/auth/android/app/build.gradle
index d8ffec49e8..930690df6c 100644
--- a/mobile/apps/auth/android/app/build.gradle
+++ b/mobile/apps/auth/android/app/build.gradle
@@ -34,6 +34,7 @@ android {
ndkVersion flutter.ndkVersion
compileOptions {
+ coreLibraryDesugaringEnabled = true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
@@ -56,7 +57,7 @@ android {
applicationId "io.ente.auth"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
- minSdkVersion 21
+ minSdkVersion 22
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
@@ -115,4 +116,6 @@ flutter {
source '../..'
}
-dependencies {}
+dependencies {
+ coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.4")
+}
diff --git a/mobile/apps/auth/android/app/proguard-rules.pro b/mobile/apps/auth/android/app/proguard-rules.pro
new file mode 100644
index 0000000000..bfd553ce58
--- /dev/null
+++ b/mobile/apps/auth/android/app/proguard-rules.pro
@@ -0,0 +1,6 @@
+# Please add these rules to your existing keep rules in order to suppress warnings.
+# This is generated automatically by the Android Gradle plugin.
+-dontwarn com.google.errorprone.annotations.CanIgnoreReturnValue
+-dontwarn com.google.errorprone.annotations.CheckReturnValue
+-dontwarn com.google.errorprone.annotations.Immutable
+-dontwarn com.google.errorprone.annotations.RestrictedApi
\ No newline at end of file
diff --git a/mobile/apps/auth/android/build.gradle b/mobile/apps/auth/android/build.gradle
index bc157bd1a1..b3c47285d6 100644
--- a/mobile/apps/auth/android/build.gradle
+++ b/mobile/apps/auth/android/build.gradle
@@ -6,6 +6,19 @@ allprojects {
}
rootProject.buildDir = '../build'
+
+subprojects {
+ afterEvaluate { project ->
+ if (project.hasProperty('android')) {
+ project.android {
+ if (namespace == null) {
+ namespace project.group
+ }
+ }
+ }
+ }
+}
+
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
diff --git a/mobile/apps/auth/android/gradle/wrapper/gradle-wrapper.properties b/mobile/apps/auth/android/gradle/wrapper/gradle-wrapper.properties
index e1ca574ef0..9c5194d3a2 100644
--- a/mobile/apps/auth/android/gradle/wrapper/gradle-wrapper.properties
+++ b/mobile/apps/auth/android/gradle/wrapper/gradle-wrapper.properties
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
\ No newline at end of file
diff --git a/mobile/apps/auth/android/settings.gradle b/mobile/apps/auth/android/settings.gradle
index 748caceba7..58725889bd 100644
--- a/mobile/apps/auth/android/settings.gradle
+++ b/mobile/apps/auth/android/settings.gradle
@@ -19,7 +19,7 @@ pluginManagement {
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
- id "com.android.application" version "7.3.0" apply false
+ id "com.android.application" version "8.2.0" apply false
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
}