From 654944430d1670084ace031ba779f06833b58ba9 Mon Sep 17 00:00:00 2001 From: Don Turner Date: Thu, 27 Jul 2023 17:57:55 +0100 Subject: [PATCH] Fix for Retrofit R8 issue, bump version to 0.1.2 Change-Id: Ia90d693731c95248211b12b1ce2e9dfab0ecf34c --- app/build.gradle.kts | 4 ++-- app/proguard-rules.pro | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index c3c0aca4f..38cb7efe2 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -29,8 +29,8 @@ plugins { android { defaultConfig { applicationId = "com.google.samples.apps.nowinandroid" - versionCode = 7 - versionName = "0.1.1" // X.Y.Z; X = Major, Y = minor, Z = Patch level + versionCode = 8 + versionName = "0.1.2" // X.Y.Z; X = Major, Y = minor, Z = Patch level // Custom test runner to set up Hilt dependency graph testInstrumentationRunner = "com.google.samples.apps.nowinandroid.core.testing.NiaTestRunner" diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index dcaf39ce7..9c7f3b935 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -7,3 +7,13 @@ -dontwarn org.openjsse.javax.net.ssl.SSLParameters -dontwarn org.openjsse.javax.net.ssl.SSLSocket -dontwarn org.openjsse.net.ssl.OpenJSSE + +# Fix for Retrofit issue https://github.com/square/retrofit/issues/3751 +# Keep generic signature of Call, Response (R8 full mode strips signatures from non-kept items). +-keep,allowobfuscation,allowshrinking interface retrofit2.Call +-keep,allowobfuscation,allowshrinking class retrofit2.Response + +# With R8 full mode generic signatures are stripped for classes that are not +# kept. Suspend functions are wrapped in continuations where the type argument +# is used. +-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation \ No newline at end of file