Skip to content

Commit 2256b3b

Browse files
authored
Merge pull request #24 from studyplus/modify/agp_3_4_2
[add]Add proguard rules for AGP 3.4.2 project
2 parents a8ad1e6 + 9cbbb9c commit 2256b3b

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

studyplus-android-sdk/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ android {
77
minSdkVersion versions.minSdk
88
targetSdkVersion versions.targetSdk
99

10+
consumerProguardFiles 'lib-proguard-rules.txt'
11+
1012
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1113
}
1214

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
22+
23+
# Kotlin Coroutines
24+
# ServiceLoader support
25+
-keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
26+
-keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}
27+
-keepnames class kotlinx.coroutines.android.AndroidExceptionPreHandler {}
28+
-keepnames class kotlinx.coroutines.android.AndroidDispatcherFactory {}
29+
30+
# Most of volatile fields are updated with AFU and should not be mangled
31+
-keepclassmembernames class kotlinx.** {
32+
volatile <fields>;
33+
}
34+
35+
# OkHttp
36+
# JSR 305 annotations are for embedding nullability information.
37+
-dontwarn javax.annotation.**
38+
39+
# A resource is loaded with a relative path so the package of this class must be preserved.
40+
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
41+
42+
# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
43+
-dontwarn org.codehaus.mojo.animal_sniffer.*
44+
45+
# OkHttp platform used only on JVM and when Conscrypt dependency is available.
46+
-dontwarn okhttp3.internal.platform.ConscryptPlatform

0 commit comments

Comments
 (0)