app/proguard-rules.pro
author Da Risk <da_risk@geekorum.com>
Mon, 26 Nov 2018 21:53:15 -0800
changeset 6 d4c38e27347c
parent 0 14443efede32
child 81 fe476e838eeb
permissions -rw-r--r--
Log retrofit method calls

# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.groovy.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

# Picasso contains Downloader with okhttp2 but we use okhttp3
-dontwarn com.squareup.okhttp.*
-dontnote com.squareup.okhttp.*

# Dagger-android has errorprone annotations
-dontwarn com.google.errorprone.annotations.*

# rules for Retrofit based on
# https://github.com/square/retrofit/blob/master/retrofit/src/main/resources/META-INF/proguard/retrofit2.pro
# Retrofit does reflection on generic parameters. InnerClasses is required to use Signature and
# EnclosingMethod is required to use InnerClasses.
-keepattributes Signature, InnerClasses, EnclosingMethod

# Retain service method parameters when optimizing.
-keepclassmembers,allowshrinking,allowobfuscation interface * {
    @retrofit2.http.* <methods>;
}

# Ignore annotation used for build tooling.
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement

# Ignore JSR 305 annotations for embedding nullability information.
-dontwarn javax.annotation.**

# Guarded by a NoClassDefFoundError try/catch and only used when on the classpath.
-dontwarn kotlin.Unit

# Top-level functions that can only be used by Kotlin.
-dontwarn retrofit2.-KotlinExtensions

# okhttp support conscrypt platform not available on android
-dontwarn org.conscrypt.**

# geekdroid: we don't use firebase stuff
-dontwarn com.geekorum.geekdroid.firebase.**

# coroutines
# ServiceLoader support
-keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
-keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}

# kotlinx serialization
-keepattributes *Annotation*, InnerClasses
-dontnote kotlinx.serialization.SerializationKt
-keep,includedescriptorclasses class com.geekorum.ttrss.**$$serializer { *; }
-keepclassmembers class com.geekorum.ttrss.** {
    *** Companion;
}
-keepclasseswithmembers class com.geekorum.ttrss.** {
    kotlinx.serialization.KSerializer serializer(...);
}

# can't find reference field in program class for these
-dontwarn com.geekorum.ttrss.network.impl.ListContent$ListContentSerializer
-dontwarn  com.geekorum.ttrss.network.impl.ListResponsePayload$ListResponsePayloadSerializer

# Most of volatile fields are updated with AFU and should not be mangled
-keepclassmembernames class kotlinx.** {
    volatile <fields>;
}