-
Notifications
You must be signed in to change notification settings - Fork 773
Proguard
Jacksgong edited this page Apr 12, 2019
·
7 revisions
There aren't any proguard rules required.
First of all, please don't forget to add okhttp proguard rules first, and then add following proguard rules:
-keepnames class com.liulishuo.okdownload.core.connection.DownloadOkHttp3Connection
Please add following proguard rules:
-keep class com.liulishuo.okdownload.core.breakpoint.BreakpointStoreOnSQLite {
public com.liulishuo.okdownload.core.breakpoint.DownloadStore createRemitSelf();
public com.liulishuo.okdownload.core.breakpoint.BreakpointStoreOnSQLite(android.content.Context);
}
So if you are using all okdownload provided components and okhttp3 on your project like sample project, just added following rules:
# okhttp https://github.com/square/okhttp/#proguard
-dontwarn okhttp3.**
-dontwarn okio.**
-dontwarn javax.annotation.**
-dontwarn org.conscrypt.**
# A resource is loaded with a relative path so the package of this class must be preserved.
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
# okdownload:okhttp
-keepnames class com.liulishuo.okdownload.core.connection.DownloadOkHttp3Connection
# okdownload:sqlite
-keep class com.liulishuo.okdownload.core.breakpoint.BreakpointStoreOnSQLite {
public com.liulishuo.okdownload.core.breakpoint.DownloadStore createRemitSelf();
public com.liulishuo.okdownload.core.breakpoint.BreakpointStoreOnSQLite(android.content.Context);
}
# Findbugs
-dontwarn edu.umd.cs.findbugs.annotations.SuppressFBWarnings`