From cf8ec8776136d3f3e270df02eb87af5baf23a0ff Mon Sep 17 00:00:00 2001 From: Milan Date: Mon, 24 Jun 2024 10:19:00 +0200 Subject: [PATCH] #96 Release build R8 warnings (#1482) * #96 Release build R8 warnings Closes #96 * #96 Proguard and documentation update Closes #96 --------- Co-authored-by: Milan Cerovsky --- README.md | 1 - app/proguard-project.txt | 7 ++++++- settings.gradle.kts | 3 +-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a0a55957..14a3fe2e 100644 --- a/README.md +++ b/README.md @@ -68,5 +68,4 @@ the project, these steps are not necessary.) 1. Test coverage for Compose code will be low, due to [known limitations](https://github.com/jacoco/jacoco/issues/1208) in the interaction between Compose and Jacoco. 1. Adding the `espresso-contrib` dependency will cause builds to fail, due to conflicting classes. This is a [known issue](https://github.com/Electric-Coin-Company/zcash-android-wallet-sdk/issues/306) with the Zcash Android SDK. 1. Android Studio will warn about the Gradle checksum. This is a [known issue](https://github.com/gradle/gradle/issues/9361) and can be safely ignored. -1. [#96](https://github.com/Electric-Coin-Company/zashi-android/issues/96) - Release builds print some R8 warnings which can be safely ignored. 1. During app first launch, the following exception starting with `AndroidKeysetManager: keyset not found, will generate a new one` is printed twice. This exception is not an error, and the code is not being invoked twice. diff --git a/app/proguard-project.txt b/app/proguard-project.txt index 5a48a2e2..07c3634d 100644 --- a/app/proguard-project.txt +++ b/app/proguard-project.txt @@ -27,4 +27,9 @@ # in the projects, so the classes aren't present. These warnings are safe to suppress. -dontwarn kotlinx.serialization.KSerializer -dontwarn kotlinx.serialization.Serializable --dontwarn kotlinx.serialization.internal.AbstractPolymorphicSerializer \ No newline at end of file +-dontwarn kotlinx.serialization.internal.AbstractPolymorphicSerializer + +-keepclassmembers class java.util.concurrent.ConcurrentHashMap { *; } +-keepclassmembers class java.util.IntSummaryStatistics { *; } +-keepclassmembers class java.util.LongSummaryStatistics { *; } +-keepclassmembers class java.util.DoubleSummaryStatistics { *; } diff --git a/settings.gradle.kts b/settings.gradle.kts index 2cf5cdfe..5c46e407 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -272,7 +272,6 @@ dependencyResolutionManagement { bundle( "androidx-compose-core", listOf( - "androidx-compose-compiler", "androidx-compose-foundation", "androidx-compose-material3", "androidx-compose-tooling", @@ -356,4 +355,4 @@ if (bip39IncludedBuildPath.isNotEmpty()) { substitute(module("cash.z.ecc.android:kotlin-bip39")).using(project(":bip39-lib")) } } -} \ No newline at end of file +}