epam / CoroutinesCache

In mobile development exists solution for caching with RxJava usage, but there is no solutions for Kotlin Coroutines. The project is to provide this functionality to mobile community.
Apache License 2.0
162 stars 7 forks source link

Crash if used with proguard #34

Closed vvsevolodovich closed 5 years ago

vvsevolodovich commented 5 years ago

If the project is built with minifyEnabled=true, the library crashes in runtime, deobfuscted stacktrace is here:

java.lang.AssertionError: AssertionError (GSON 2.8.5): java.lang.NoSuchFieldException: MEMORY
    at com.google.gson.Gson.fromJson(Gson.java:944)
    at com.google.gson.Gson.fromJson(Gson.java:892)
    at com.epam.coroutinecache.mappers.GsonMapper.fromJson(GsonMapper.java:21)
    at com.epam.coroutinecache.core.DiskCache.a(DiskCache.java:75)
    at com.epam.coroutinecache.core.actions.GetRecordAction$getRecord$2.invokeSuspend(GetRecordAction.java:34)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.a(BaseContinuationImpl.java:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.java:241)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.parkedWorkersStackTopUpdate(CoroutineScheduler.java:594)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.java:594)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.access$getCorePoolSize$p(CoroutineScheduler.java:60)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.access$parkedWorkersStackPush(CoroutineScheduler.java:60)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.access$parkedWorkersStackTopUpdate(CoroutineScheduler.java:60)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.java:60)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.java:742)