build(servicing): 更新构建配置并升级版本号
-禁用 release 和 debug 构建类型的代码压缩 - 添加 publishNonDefault 配置项 -将版本号从 1.0.1.9.9.126 升级到 1.0.1.9.9.127
This commit is contained in:
260
app/proguard-rules.pro
vendored
260
app/proguard-rules.pro
vendored
@ -18,4 +18,262 @@
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
-dontwarn java.lang.invoke.StringConcatFactory
|
||||
|
||||
# 保留行号用于调试
|
||||
-keepattributes SourceFile,LineNumberTable
|
||||
-renamesourcefileattribute SourceFile
|
||||
|
||||
# 保留基本属性
|
||||
-keepattributes Signature
|
||||
-keepattributes *Annotation*
|
||||
-keepattributes Exceptions
|
||||
-keepattributes InnerClasses
|
||||
|
||||
-dontwarn com.github.luben.zstd.BufferPool
|
||||
-dontwarn com.github.luben.zstd.ZstdInputStream
|
||||
-dontwarn com.github.luben.zstd.ZstdOutputStream
|
||||
-dontwarn org.brotli.dec.BrotliInputStream
|
||||
-dontwarn org.objectweb.asm.AnnotationVisitor
|
||||
-dontwarn org.objectweb.asm.Attribute
|
||||
-dontwarn org.objectweb.asm.ClassReader
|
||||
-dontwarn org.objectweb.asm.ClassVisitor
|
||||
-dontwarn org.objectweb.asm.FieldVisitor
|
||||
-dontwarn org.objectweb.asm.Label
|
||||
-dontwarn org.objectweb.asm.MethodVisitor
|
||||
-dontwarn org.objectweb.asm.Type
|
||||
|
||||
# 保留R文件
|
||||
-keepclassmembers class **.R$* {
|
||||
public static <fields>;
|
||||
}
|
||||
|
||||
## 保留servicing模块中的所有model类
|
||||
#-keep class com.za.bean.** { *; }
|
||||
#-keep class com.za.bean.db.** { *; }
|
||||
#-keep class com.za.bean.request.** { *; }
|
||||
#
|
||||
## 保留servicing模块中的所有接口
|
||||
#-keep interface com.za.servicing.** { *; }
|
||||
#-keep interface com.za.net.** { *; }
|
||||
#
|
||||
## 保留servicing模块中的所有枚举
|
||||
#-keepclassmembers enum com.za.** { *; }
|
||||
#
|
||||
## 保留Room数据库相关类
|
||||
#-keep class com.za.room.** { *; }
|
||||
#-keep class com.za.room.db.** { *; }
|
||||
#-keep class * extends androidx.room.RoomDatabase
|
||||
#-keep @androidx.room.Entity class *
|
||||
#-keep @androidx.room.Dao interface *
|
||||
|
||||
# 保留Parcelable实现类
|
||||
-keep class * implements android.os.Parcelable {
|
||||
public static final android.os.Parcelable$Creator *;
|
||||
}
|
||||
|
||||
# 保留Serializable实现类
|
||||
-keepnames class * implements java.io.Serializable
|
||||
-keepclassmembers class * implements java.io.Serializable {
|
||||
static final long serialVersionUID;
|
||||
private static final java.io.ObjectStreamField[] serialPersistentFields;
|
||||
!static !transient <fields>;
|
||||
private void writeObject(java.io.ObjectOutputStream);
|
||||
private void readObject(java.io.ObjectInputStream);
|
||||
java.lang.Object writeReplace();
|
||||
java.lang.Object readResolve();
|
||||
}
|
||||
|
||||
# 保留WebView相关
|
||||
-keepclassmembers class * extends android.webkit.WebViewClient {
|
||||
public void *(android.webkit.WebView, java.lang.String, android.graphics.Bitmap);
|
||||
public boolean *(android.webkit.WebView, java.lang.String);
|
||||
}
|
||||
-keepclassmembers class * extends android.webkit.WebViewClient {
|
||||
public void *(android.webkit.WebView, java.lang.String);
|
||||
}
|
||||
|
||||
# 保留native方法
|
||||
-keepclasseswithmembernames class * {
|
||||
native <methods>;
|
||||
}
|
||||
|
||||
## 保留View的getter和setter
|
||||
#-keepclassmembers public class * extends android.view.View {
|
||||
# void set*(***); *** get*();
|
||||
#}
|
||||
|
||||
# CameraX相关
|
||||
#-keep class androidx.camera.** { *; }
|
||||
#-dontwarn androidx.camera.**
|
||||
#
|
||||
## Coil图片加载库
|
||||
#-keep class coil.** { *; }
|
||||
#-dontwarn coil.**
|
||||
#
|
||||
## PermissionX权限库
|
||||
#-keep class com.permissionx.guolindev.** { *; }
|
||||
#
|
||||
## 高德地图相关
|
||||
#-keep class com.amap.api.**{*;}
|
||||
#-keep class com.autonavi.**{*;}
|
||||
#-keep class com.loc.**{*;}
|
||||
#-dontwarn com.amap.api.**
|
||||
#-dontwarn com.autonavi.**
|
||||
#-dontwarn com.loc.**
|
||||
#
|
||||
## JPush相关
|
||||
#-dontoptimize
|
||||
#-dontwarn cn.jpush.**
|
||||
#-keep class cn.jpush.** { *; }
|
||||
#-dontwarn cn.jcore.**
|
||||
#-keep class cn.jcore.** { *; }
|
||||
#
|
||||
## Retrofit网络库
|
||||
#-keepattributes Signature
|
||||
#-keepattributes Exceptions
|
||||
#-dontwarn retrofit2.**
|
||||
#-keep class retrofit2.** { *; }
|
||||
#-keepclasseswithmembers class * {
|
||||
# @retrofit2.http.* <methods>;
|
||||
#}
|
||||
#
|
||||
## OkHttp
|
||||
#-dontwarn okhttp3.**
|
||||
#-dontwarn okio.**
|
||||
#-keep class okhttp3.** { *; }
|
||||
#-keep class okio.** { *; }
|
||||
#
|
||||
## RxJava
|
||||
#-dontwarn io.reactivex.**
|
||||
#-keep class io.reactivex.** { *; }
|
||||
#-dontwarn sun.misc.**
|
||||
#-keepclassmembers class rx.internal.util.unsafe.*ArrayQueue*Field* {
|
||||
# long producerIndex;
|
||||
# long consumerIndex;
|
||||
#}
|
||||
#
|
||||
## BlankJ工具库
|
||||
#-dontwarn com.blankj.utilcode.**
|
||||
#-keep class com.blankj.utilcode.** { *; }
|
||||
#-keepclassmembers class * {
|
||||
# @com.blankj.utilcode.util.BusUtils$Bus <methods>;
|
||||
#}
|
||||
#-keep public class * extends com.blankj.utilcode.util.ApiUtils$BaseApi
|
||||
#-keep,allowobfuscation @interface com.blankj.utilcode.util.ApiUtils$Api
|
||||
#-keep @com.blankj.utilcode.util.ApiUtils$Api class *
|
||||
#
|
||||
##mmkv
|
||||
#-renamesourcefileattribute SourceFile
|
||||
#-keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,EnclosingMethod
|
||||
#-keep public class * {
|
||||
# public protected *;
|
||||
#}
|
||||
##
|
||||
### 保留所有类的方法名
|
||||
##-keepclassmembernames class * {
|
||||
## java.lang.Class class$(java.lang.String);
|
||||
## java.lang.Class class$(java.lang.String, boolean);
|
||||
##}
|
||||
#
|
||||
## 保留枚举类中的特殊静态方法
|
||||
#-keepclassmembers class * extends java.lang.Enum {
|
||||
# public static **[] values();
|
||||
# public static ** valueOf(java.lang.String);
|
||||
#}
|
||||
#
|
||||
## MQTT相关
|
||||
#-keep class org.eclipse.paho.** { *; }
|
||||
#-dontwarn org.eclipse.paho.**
|
||||
#
|
||||
## Gson
|
||||
#-keep class com.google.gson.** { *; }
|
||||
#-keepattributes Signature
|
||||
#-keepattributes *Annotation*
|
||||
#-keep class * implements com.google.gson.TypeAdapterFactory
|
||||
#-keep class * implements com.google.gson.JsonSerializer
|
||||
#-keep class * implements com.google.gson.JsonDeserializer
|
||||
#
|
||||
### Kotlin相关
|
||||
###-keep class kotlin.** { *; }
|
||||
##-keep class kotlin.Metadata { *; }
|
||||
##-dontwarn kotlin.**
|
||||
##-keepclassmembers class **$WhenMappings {
|
||||
## <fields>;
|
||||
##}
|
||||
##-keepclassmembers class kotlin.Metadata {
|
||||
## public <methods>;
|
||||
##}
|
||||
#
|
||||
## Kotlin协程
|
||||
##-keepclassmembernames class kotlinx.** {
|
||||
## volatile <fields>;
|
||||
##}
|
||||
##-keepclassmembers class * {
|
||||
## @kotlin.coroutines.jvm.internal.DebugMetadata *;
|
||||
## @kotlin.coroutines.jvm.internal.SuspendLambda *;
|
||||
##}
|
||||
##-keep class kotlinx.coroutines.** { *; }
|
||||
##-dontwarn kotlinx.coroutines.**
|
||||
#
|
||||
## Kotlin反射
|
||||
##-keep class kotlin.reflect.** { *; }
|
||||
##-dontwarn kotlin.reflect.**
|
||||
#
|
||||
## 保留Kotlin数据类
|
||||
##-keepclassmembers class ** {
|
||||
## public ** component*();
|
||||
## public ** copy(...);
|
||||
##}
|
||||
#
|
||||
## 保留Kotlin数据类的toString/hashCode/equals方法
|
||||
##-keepclassmembers class ** {
|
||||
## public java.lang.String toString();
|
||||
## public int hashCode();
|
||||
## public boolean equals(java.lang.Object);
|
||||
##}
|
||||
##
|
||||
### 保留Compose相关
|
||||
##-keep class androidx.compose.** { *; }
|
||||
##-dontwarn androidx.compose.**
|
||||
##
|
||||
### 保留自定义签名相关类
|
||||
##-keep class com.za.signature.** { *; }
|
||||
##
|
||||
### 保留Face Detection相关
|
||||
##-keep class com.google.mlkit.** { *; }
|
||||
##-dontwarn com.google.mlkit.**
|
||||
#
|
||||
## 保留ZXing相关
|
||||
#-keep class com.google.zxing.** { *; }
|
||||
#-dontwarn com.google.zxing.**
|
||||
#
|
||||
## 保留Glide相关
|
||||
#-keep public class * implements com.bumptech.glide.module.GlideModule
|
||||
#-keep class * extends com.bumptech.glide.module.AppGlideModule {
|
||||
# <init>(...);
|
||||
#}
|
||||
#-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
|
||||
# **[] $VALUES;
|
||||
# public *;
|
||||
#}
|
||||
#-keep class com.bumptech.glide.load.data.ParcelFileDescriptorRewinder$InternalRewinder {
|
||||
# *** rewind();
|
||||
#}
|
||||
#
|
||||
## 保留FastJSON相关
|
||||
#-keep class com.alibaba.fastjson.** { *; }
|
||||
#-dontwarn com.alibaba.fastjson.**
|
||||
#
|
||||
## 保留Bugly相关
|
||||
#-keep class com.tencent.bugly.** { *; }
|
||||
#-dontwarn com.tencent.bugly.**
|
||||
##
|
||||
### 保留自定义UI组件
|
||||
###-keep class com.za.ui.** { *; }
|
||||
###-keep class com.za.base.** { *; }
|
||||
##
|
||||
### 保留Java 8 Lambda表达式
|
||||
##-dontwarn java.lang.invoke.StringConcatFactory
|
@ -1,23 +0,0 @@
|
||||
package com.za.sdk.demo
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
import org.junit.Assert.*
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* See [testing documentation](http://d.android.com/tools/testing).
|
||||
*/
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class ExampleInstrumentedTest {
|
||||
@Test
|
||||
fun useAppContext() { // Context of the app under test.
|
||||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
|
||||
assertEquals("com.za.sdk.demo", appContext.packageName)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user