diff --git a/.idea/misc.xml b/.idea/misc.xml index 21e99e2dc0..cd77a1f062 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -4,7 +4,7 @@ - + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 7cc03f57b3..980a83ff5d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -44,6 +44,8 @@ android { } release { minifyEnabled false + zipAlignEnabled false + shrinkResources false signingConfig signingConfigs.release proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } @@ -298,7 +300,7 @@ dependencies { releaseImplementation project(':modules:mogo-module-gps-simulator-noop') implementation project(':modules:mogo-module-media') implementation project(':modules:mogo-module-service') -// implementation project(':modules:mogo-module-splash') + implementation project(':modules:mogo-module-splash') // 事件面板分渠道引用 d82xImplementation project(':modules:mogo-module-event-panel-noop') em1Implementation project(':modules:mogo-module-event-panel-noop') diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index f1b424510d..336140b797 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -19,3 +19,271 @@ # If you keep the line number information, uncomment this to # hide the original source file name. #-renamesourcefileattribute SourceFile + + +# +#-------------------------------------------基本不用动区域---------------------------------------------- +# +# +# -----------------------------基本 ----------------------------- + +# 指定代码的压缩级别 0 - 7(指定代码进行迭代优化的次数,在Android里面默认是5,这条指令也只有在可以优化时起作用。) +-optimizationpasses 5 +# 混淆时不会产生形形色色的类名(混淆时不使用大小写混合类名) +-dontusemixedcaseclassnames +# 指定不去忽略非公共的库类(不跳过library中的非public的类) +-dontskipnonpubliclibraryclasses +# 指定不去忽略包可见的库类的成员 +-dontskipnonpubliclibraryclassmembers +#不进行优化,建议使用此选项, +-dontoptimize + # 不进行预校验,Android不需要,可加快混淆速度。 +-dontpreverify + +# 屏蔽警告,暂不开启。用于抛出异常 +#-ignorewarnings +# 指定混淆是采用的算法,后面的参数是一个过滤器 +# 这个过滤器是谷歌推荐的算法,一般不做更改 +-optimizations !code/simplification/arithmetic,!field/*,!class/merging/* +# 保护代码中的Annotation不被混淆 +-keepattributes *Annotation*,InnerClasses,Signature,EnclosingMethod +# 避免混淆泛型, 这在JSON实体映射时非常重要 +-keepattributes Signature +# 抛出异常时保留代码行号 +-keepattributes SourceFile,LineNumberTable + #优化时允许访问并修改有修饰符的类和类的成员,这可以提高优化步骤的结果。 +# 比如,当内联一个公共的getter方法时,这也可能需要外地公共访问。 +# 虽然java二进制规范不需要这个,要不然有的虚拟机处理这些代码会有问题。当有优化和使用-repackageclasses时才适用。 +#指示语:不能用这个指令处理库中的代码,因为有的类和类成员没有设计成public ,而在api中可能变成public +-allowaccessmodification + # 混淆时记录日志(打印混淆的详细信息) + # 这句话能够使我们的项目混淆后产生映射文件 + # 包含有类名->混淆后类名的映射关系 +-verbose + + +# +# ----------------------------- 默认保留 ----------------------------- +# +#---------------------------------------------------- +# 保持哪些类不被混淆 +#继承activity,application,service,broadcastReceiver,contentprovider....不进行混淆 + +-keep public class * extends android.app.Activity +-keep public class * extends android.app.Fragment +-keep public class * extends android.app.Application +-keep public class * extends android.app.Service +-keep public class * extends android.content.BroadcastReceiver +-keep public class * extends android.content.ContentProvider +-keep public class * extends android.app.backup.BackupAgentHelper +-keep public class * extends android.preference.Preference +-keep public class * extends android.view.View + +-keep public class androidx.*{*;} +-keep public class * extends androidx.*{*;} +-keep interface androidx.* {*;} +-dontwarn androidx.** + +-dontwarn android.support.design.** +-keep public class android.support.design.R$* { *; } +-keep class com.google.android.material.* {*;} + +-keepclasseswithmembernames class * { + native ; +} + +#这个主要是在layout 中写的onclick方法android:onclick="onClick",不进行混淆 +#表示不混淆Activity中参数是View的方法 +-keepclassmembers class * extends android.app.Activity{ + public void *(android.view.View); +} +#表示不混淆枚举中的values()和valueOf()方法 +-keepclassmembers enum * { + public static **[] values(); + public static ** valueOf(java.lang.String); +} + +#表示不混淆任何一个View中的setXxx()和getXxx()方法, +#因为属性动画需要有相应的setter和getter的方法实现,混淆了就无法工作了。 +-keep public class * extends android.view.View{ + *** get*(); + void set*(***); + public (android.content.Context); + public (android.content.Context, android.util.AttributeSet); + public (android.content.Context, android.util.AttributeSet, int); +} +-keepclasseswithmembers class * { + public (android.content.Context, android.util.AttributeSet); + public (android.content.Context, android.util.AttributeSet, int); +} + +#表示不混淆Parcelable +-keep class * implements android.os.Parcelable { + public static final android.os.Parcelable *; +} + +# 这指定了继承Serizalizable的类的如下成员不被移除混淆 +-keepclassmembers class * implements java.io.Serializable { + static final long serialVersionUID; + private static final java.io.ObjectStreamField[] serialPersistentFields; + private void writeObject(java.io.ObjectOutputStream); + private void readObject(java.io.ObjectInputStream); + java.lang.Object writeReplace(); + java.lang.Object readResolve(); +} + +# 保留R下面的资源 +-keep class **.R$* { + *; +} + +#不混淆资源类下static的 +-keepclassmembers class **.R$* { + public static ; +} + +# 对于带有回调函数的onXXEvent、**On*Listener的,不能被混淆 +-keepclassmembers class * { + void *(**On*Event); + void *(**On*Listener); +} + +#(可选)避免Log打印输出 +-assumenosideeffects class android.util.Log { + public static *** v(...); + public static *** d(...); + public static *** i(...); + public static *** w(...); +} + +#----------------------------------------第三方库---------------------------------------------- +#-----高德地图----- +#3D 地图 V5.0.0之后: +-keep class com.amap.api.maps.*{*;} +-keep class com.autonavi.*{*;} +-keep class com.amap.api.trace.*{*;} +#定位 +-keep class com.amap.api.location.*{*;} +-keep class com.amap.api.fence.*{*;} +-keep class com.autonavi.aps.amapapi.model.*{*;} +#搜索 +-keep class com.amap.api.services.*{*;} +#导航 +-keep class com.amap.api.navi.*{*;} +-keep class com.autonavi.*{*;} + +#-----Gson----- +-dontwarn sun.misc.** +# Application classes that will be serialized/deserialized over Gson +-keep class com.google.gson.examples.android.model.* { ; } +# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory, +# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter) +-keep class * extends com.google.gson.TypeAdapter +-keep class * implements com.google.gson.TypeAdapterFactory +-keep class * implements com.google.gson.JsonSerializer +-keep class * implements com.google.gson.JsonDeserializer +# Prevent R8 from leaving Data object members always null +-keepclassmembers,allowobfuscation class * { + @com.google.gson.annotations.SerializedName ; +} + +#-----ARouter----- +-keep public class com.alibaba.android.arouter.routes.*{*;} +-keep public class com.alibaba.android.arouter.facade.*{*;} +-keep class * implements com.alibaba.android.arouter.facade.template.ISyringe{*;} +# If you use the byType method to obtain Service, add the following rules to protect the interface: +-keep interface * implements com.alibaba.android.arouter.facade.template.IProvider +# If single-type injection is used, that is, no interface is defined to implement IProvider, the following rules need to be added to protect the implementation +# -keep class * implements com.alibaba.android.arouter.facade.template.IProvider + +#-----Glide----- +-keep public class * implements com.bumptech.glide.module.GlideModule +-keep public class * extends com.bumptech.glide.module.AppGlideModule +-keep public enum com.bumptech.glide.load.ImageHeaderParser$** { + **[] $VALUES; + public *; +} +#如果你的 target API 低于 Android API 27,请添加: +-dontwarn com.bumptech.glide.load.resource.bitmap.VideoDecoder + +#-----Fresco----- +-keep,allowobfuscation interface com.facebook.common.internal.DoNotStrip +-keep @com.facebook.common.internal.DoNotStrip class * +-keepclassmembers class * { + @com.facebook.common.internal.DoNotStrip *; +} +-keepclassmembers class * { + native ; +} +-dontwarn okio.** +-dontwarn com.squareup.okhttp.** +-dontwarn okhttp3.** +-dontwarn javax.annotation.** +-dontwarn com.android.volley.toolbox.** +-dontwarn com.facebook.infer.** + +#-----Okio----- +# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java. +-dontwarn org.codehaus.mojo.animal_sniffer.* + +#-----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 + +#-----Retrofit----- +# Retrofit does reflection on method and parameter annotations. +-keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations +# Retain service method parameters when optimizing. +-keepclassmembers,allowshrinking,allowobfuscation interface * { + @retrofit2.http.* ; +} +# 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.* +# With R8 full mode, it sees no subtypes of Retrofit interfaces since they are created with a Proxy +# and replaces all potential values with null. Explicitly keeping the interfaces prevents this. +-if interface * { @retrofit2.http.* ; } +-keep,allowobfuscation interface <1> + +#-----ProtoBuf----- +-keep class com.google.protobuf.*{*;} + +#-----GSYVideoPlayer----- +-keep class tv.danmaku.ijk.* { *; } +-dontwarn tv.danmaku.ijk.** +-keep class com.shuyu.gsyvideoplayer.* { *; } +-dontwarn com.shuyu.gsyvideoplayer.** + +#-----EventBus----- +-keepattributes *Annotation* +-keepclassmembers class * { + @org.greenrobot.eventbus.Subscribe ; +} +-keep enum org.greenrobot.eventbus.ThreadMode { *; } +# And if you use AsyncExecutor: +-keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent { + (java.lang.Throwable); +} + +#-----ZhiDaoService----- +-keep class com.zhidao.auto.*{*;} +-keep class com.zhidaohulian.*{*;} +-keep class com.elegant.analytics.*{*;} +-keep class com.zhidao.socketsdk.*{*;} +-keep class com.zhidao.ptech.*{*;} +-keep class com.zhidao.autopilot.support.*{*;} + + + + diff --git a/gradle.properties b/gradle.properties index 4a72543d33..70a08e92f1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -57,7 +57,7 @@ MOGO_MODULE_MAIN_INDEPENDENT_VERSION = 1.2.1.17 ## 工程外部模块 # 探路 -MOGO_MODULE_TANLU_VERSION=1.3.0.2 +MOGO_MODULE_TANLU_VERSION=1.3.0.3-byd # 车聊聊 CARCHATTING_VERSION=1.3.2 # 车聊聊接口 @@ -77,7 +77,7 @@ MOGO_MODULE_PUSH_NOOP_VERSION=1.1.5.6 # 广告资源位 MOGO_MODULE_AD_CARD_VERSION=1.0.1 # 探路上报和分享模块 -TANLULIB_VERSION=1.3.0.2 +TANLULIB_VERSION=1.3.0.3-byd MOGO_MODULE_EVENT_PANEL_VERSION = 1.0.0-SNAPSHOT MOGO_MODULE_EVENT_PANEL_NOOP_VERSION = 1.0.0-SNAPSHOT #左侧面板模块 diff --git a/modules/mogo-module-authorize/src/main/res/drawable-xhdpi-1920x1000/module_authorize_selector_blue_corner.xml b/modules/mogo-module-authorize/src/main/res/drawable-xhdpi-1920x1000/module_authorize_selector_blue_corner.xml new file mode 100644 index 0000000000..c2d1fec152 --- /dev/null +++ b/modules/mogo-module-authorize/src/main/res/drawable-xhdpi-1920x1000/module_authorize_selector_blue_corner.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/modules/mogo-module-authorize/src/main/res/drawable-xhdpi-1920x1000/module_authorize_selector_blue_left_corner.xml b/modules/mogo-module-authorize/src/main/res/drawable-xhdpi-1920x1000/module_authorize_selector_blue_left_corner.xml new file mode 100644 index 0000000000..8c950afee3 --- /dev/null +++ b/modules/mogo-module-authorize/src/main/res/drawable-xhdpi-1920x1000/module_authorize_selector_blue_left_corner.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/modules/mogo-module-authorize/src/main/res/drawable-xhdpi-1920x1000/module_authorize_selector_dark_corner.xml b/modules/mogo-module-authorize/src/main/res/drawable-xhdpi-1920x1000/module_authorize_selector_dark_corner.xml new file mode 100644 index 0000000000..86e673bca6 --- /dev/null +++ b/modules/mogo-module-authorize/src/main/res/drawable-xhdpi-1920x1000/module_authorize_selector_dark_corner.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/modules/mogo-module-authorize/src/main/res/drawable-xhdpi-1920x1000/module_authorize_selector_dark_right_corner.xml b/modules/mogo-module-authorize/src/main/res/drawable-xhdpi-1920x1000/module_authorize_selector_dark_right_corner.xml new file mode 100644 index 0000000000..086f0e93fa --- /dev/null +++ b/modules/mogo-module-authorize/src/main/res/drawable-xhdpi-1920x1000/module_authorize_selector_dark_right_corner.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/modules/mogo-module-authorize/src/main/res/drawable-xhdpi-1920x1000/module_authorize_shape_drak_top_corner.xml b/modules/mogo-module-authorize/src/main/res/drawable-xhdpi-1920x1000/module_authorize_shape_drak_top_corner.xml new file mode 100644 index 0000000000..38ff34eb71 --- /dev/null +++ b/modules/mogo-module-authorize/src/main/res/drawable-xhdpi-1920x1000/module_authorize_shape_drak_top_corner.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/modules/mogo-module-authorize/src/main/res/layout-xhdpi-1920x1000/module_authorize_fragment.xml b/modules/mogo-module-authorize/src/main/res/layout-xhdpi-1920x1000/module_authorize_fragment.xml new file mode 100644 index 0000000000..43b33aa0c5 --- /dev/null +++ b/modules/mogo-module-authorize/src/main/res/layout-xhdpi-1920x1000/module_authorize_fragment.xml @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + +