From bd29f905c57a19854af5e84ca144dec576f3c32d Mon Sep 17 00:00:00 2001 From: Harri Kirik Date: Fri, 25 Nov 2022 20:41:07 +0200 Subject: [PATCH] Fix the R8 and TypeToken issue --- .../domain/usecases/storage/StorageTestUseCase.kt | 1 + app/proguard-rules.pro | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/app-domain/src/main/java/mobi/lab/hardwarekeybasedencryptedstoragetester/domain/usecases/storage/StorageTestUseCase.kt b/app-domain/src/main/java/mobi/lab/hardwarekeybasedencryptedstoragetester/domain/usecases/storage/StorageTestUseCase.kt index 160da9f..279eeba 100644 --- a/app-domain/src/main/java/mobi/lab/hardwarekeybasedencryptedstoragetester/domain/usecases/storage/StorageTestUseCase.kt +++ b/app-domain/src/main/java/mobi/lab/hardwarekeybasedencryptedstoragetester/domain/usecases/storage/StorageTestUseCase.kt @@ -32,6 +32,7 @@ class StorageTestUseCase @Inject constructor( logger.d("Done\n") StorageTestResult.Success(measurementResults) } catch (t: Throwable) { + logger.e(t, "runTest") StorageTestResult.Failed(t) } } diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index fbd371a..6c8aff2 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -52,6 +52,12 @@ } ## +## TypeToken +# Retain generic signatures of TypeToken and its subclasses with R8 version 3.0 and higher. +-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken +-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken +## + ## Crashlytics reports -keepattributes *Annotation* -keepattributes SourceFile,LineNumberTable