PassAndroid/android/proguard-project.txt

156 lines
4.8 KiB
Text
Raw Normal View History

# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
#http://stackoverflow.com/questions/19274974/android-badparcelableexception-only-with-signed-apk
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
2019-05-06 07:01:33 +00:00
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# optimize
2019-05-06 07:01:33 +00:00
-optimizationpasses 2
-optimizations !code/simplification/arithmetic
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
2019-05-06 07:01:33 +00:00
# Keep line numbers to alleviate debugging stack traces
2019-05-06 07:01:33 +00:00
-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable
### for api client
-keepattributes Signature,RuntimeVisibleAnnotations,AnnotationDefault
-keepclassmembers class * {
@com.google.api.client.util.Key <fields>;
}
# Needed by Guava
# See https://groups.google.com/forum/#!topic/guava-discuss/YCZzeCiIVoI
-dontwarn sun.misc.Unsafe
-dontwarn com.google.common.collect.MinMaxPriorityQueue
# Needed by google-http-client-android when linking against an older platform version
-dontwarn com.google.api.client.extensions.android.**
# Needed by google-api-client-android when linking against an older platform version
-dontwarn com.google.api.client.googleapis.extensions.android.**
#### for butterknife
-dontwarn butterknife.internal.**
-keep class **$$ViewBinder { *; }
-keepnames class * { @butterknife.Bind *;}
#### for guava
-dontwarn javax.annotation.**
-dontwarn javax.inject.**
-dontwarn sun.misc.Unsafe
-dontwarn com.google.common.collect.MinMaxPriorityQueue
-keep,allowoptimization class com.google.inject.** { *; }
-keep,allowoptimization class javax.inject.** { *; }
-keep,allowoptimization class javax.annotation.** { *; }
-keep,allowoptimization class com.google.inject.Binder
-keepclasseswithmembers public class * {
public static void main(java.lang.String[]);
}
-keepclassmembers,allowoptimization class com.google.common.* {
void finalizeReferent();
void startFinalizer(java.lang.Class,java.lang.Object);
}
-keepclassmembers class * {
@com.google.common.eventbus.Subscribe *;
}
-dontwarn java.nio.file.Files
-dontwarn java.nio.file.Path
-dontwarn java.nio.file.OpenOption
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
## New rules for EventBus 3.0.x ##
# http://greenrobot.org/eventbus/documentation/proguard/
2016-03-22 12:44:00 +00:00
-keepattributes *Annotation*
2019-05-06 07:01:33 +00:00
-keepclassmembers class * {
@org.greenrobot.eventbus.Subscribe <methods>;
2019-05-06 07:01:33 +00:00
}
-keep enum org.greenrobot.eventbus.ThreadMode { *; }
# Only required if you use AsyncExecutor
-keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
<init>(java.lang.Throwable);
2019-05-06 07:01:33 +00:00
}
### for moshi
-keepclassmembers class ** {
@com.squareup.moshi.FromJson *;
@com.squareup.moshi.ToJson *;
2016-03-22 12:44:00 +00:00
}
# Application classes that will be serialized/deserialized via Moshi, keepclassmembers
-keep class org.ligi.passandroid.model.** { *; }
-keepclassmembers class org.ligi.passandroid.model.** { *; }
2016-04-11 17:51:22 +00:00
# http://stackoverflow.com/questions/37431372/cant-find-referenced-class-with-proguard-and-kotlin
-keep class org.ligi.passandroid.model.InputStreamWithSource
-keep class org.ligi.passandroid.ui.PassExporter
-keep class org.ligi.passandroid.helper.CategoryHelper
-keep enum org.ligi.passandroid.model.pass.PassBarCodeFormat
2016-07-16 18:32:44 +00:00
-keep class org.ligi.passandroid.helper.CategoryHelper
-keep class org.ligi.passandroid.ui.MoveToNewTopicUI
2016-04-14 19:32:17 +00:00
# the below line needs some investigation - was only needed after switching event classes to kotlin
-keep class org.ligi.passandroid.events.** { *; }
2016-04-11 17:51:22 +00:00
# Kotlin specific
-dontwarn kotlin.**
-assumenosideeffects class kotlin.jvm.internal.Intrinsics {
static void checkParameterIsNotNull(java.lang.Object, java.lang.String);
}
2018-07-29 14:19:42 +00:00
## okhttp
# JSR 305 annotations are for embedding nullability information.
-dontwarn javax.annotation.**
# A resource is loaded with a relative path so the package of this class must be preserved.
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
-dontwarn org.codehaus.mojo.animal_sniffer.*
# OkHttp platform used only on JVM and when Conscrypt dependency is available.
-dontwarn okhttp3.internal.platform.ConscryptPlatform