From 306f62f7ca262b47640d876114feafa093477332 Mon Sep 17 00:00:00 2001 From: ZhanGSKen Date: Fri, 21 Nov 2025 14:20:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BA=94=E7=94=A8=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E6=B7=B7=E6=B7=86=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- powerbell/build.gradle | 22 +-- powerbell/build.properties | 4 +- powerbell/proguard-rules.pro | 137 +++++++++++++++++- .../res/layout/dialog_networkbackground.xml | 3 +- 4 files changed, 142 insertions(+), 24 deletions(-) diff --git a/powerbell/build.gradle b/powerbell/build.gradle index 100dc1c7..5810634a 100644 --- a/powerbell/build.gradle +++ b/powerbell/build.gradle @@ -39,14 +39,7 @@ android { } } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } - - // 米盟 + // 米盟 SDK packagingOptions { doNotStrip "*/*/libmimo_1011.so" } @@ -55,14 +48,15 @@ android { dependencies { // 米盟 - implementation 'com.miui.zeus:mimo-ad-sdk:5.3.+'//请使用最新版sdk + api 'com.miui.zeus:mimo-ad-sdk:5.3.+'//请使用最新版sdk //注意:以下5个库必须要引入 - //implementation 'androidx.appcompat:appcompat:1.4.1' - implementation 'androidx.recyclerview:recyclerview:1.0.0' - implementation 'com.google.code.gson:gson:2.8.5' - implementation 'com.github.bumptech.glide:glide:4.9.0' + //api 'androidx.appcompat:appcompat:1.4.1' + api 'androidx.recyclerview:recyclerview:1.0.0' + api 'com.google.code.gson:gson:2.8.5' + api 'com.github.bumptech.glide:glide:4.9.0' //annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0' + // 应用介绍页类库 api 'io.github.medyo:android-about-page:2.0.0' // SSH @@ -83,7 +77,7 @@ dependencies { //api 'androidx.vectordrawable:vectordrawable-animated:1.1.0' //api 'androidx.fragment:fragment:1.1.0' - implementation 'cc.winboll.studio:libaes:15.11.5' + implementation 'cc.winboll.studio:libaes:15.11.6' implementation 'cc.winboll.studio:libappbase:15.11.0' //api fileTree(dir: 'libs', include: ['*.aar']) diff --git a/powerbell/build.properties b/powerbell/build.properties index 21b50247..12bb85db 100644 --- a/powerbell/build.properties +++ b/powerbell/build.properties @@ -1,8 +1,8 @@ #Created by .winboll/winboll_app_build.gradle -#Fri Nov 21 03:39:38 HKT 2025 +#Fri Nov 21 06:19:46 GMT 2025 stageCount=6 libraryProject= baseVersion=15.11 publishVersion=15.11.5 -buildCount=0 +buildCount=3 baseBetaVersion=15.11.6 diff --git a/powerbell/proguard-rules.pro b/powerbell/proguard-rules.pro index ce666849..855b18ac 100644 --- a/powerbell/proguard-rules.pro +++ b/powerbell/proguard-rules.pro @@ -9,12 +9,135 @@ # Add any project specific keep options here: -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} +# ============================== 基础通用规则 ============================== +# 保留系统组件 +-keep public class * extends android.app.Activity +-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 -## 米盟 +# 保留 WinBoLL 核心包及子类(合并简化规则) +-keep class cc.winboll.studio.** { *; } +-keepclassmembers class cc.winboll.studio.** { *; } + +# 保留所有类中的 public static final String TAG 字段(便于日志定位) +-keepclassmembers class * { + public static final java.lang.String TAG; +} + +# 保留序列化类(避免Parcelable/Gson解析异常) +-keep class * implements android.os.Parcelable { + public static final android.os.Parcelable$Creator *; +} +-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 文件(避免资源ID混淆) +-keepclassmembers class **.R$* { + public static ; +} + +# 保留 native 方法(避免JNI调用失败) +-keepclasseswithmembernames class * { + native ; +} + +# 保留注解和泛型(避免反射/序列化异常) +-keepattributes *Annotation* +-keepattributes Signature + +# 屏蔽 Java 8+ 警告(适配 Java 7 语法) +-dontwarn java.lang.invoke.* +-dontwarn android.support.v8.renderscript.* +-dontwarn java.util.function.** + +# ============================== 第三方框架专项规则 ============================== +# OkHttp 4.4.1(米盟广告请求依赖,完善Lambda兼容) +-keep class okhttp3.** { *; } +-keep interface okhttp3.** { *; } +-keep class okhttp3.internal.** { *; } +-keep class okio.** { *; } +-dontwarn okhttp3.internal.platform.** +-dontwarn okio.** +# ============================== 必要补充规则 ============================== +# OkHttp 4.4.1 补充规则(Java 7 兼容) +-keep class okhttp3.internal.concurrent.** { *; } +-keep class okhttp3.internal.connection.** { *; } +-dontwarn okhttp3.internal.concurrent.TaskRunner +-dontwarn okhttp3.internal.connection.RealCall + +# Glide 4.9.0(米盟广告图片加载依赖) +-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$ImageType { + **[] $VALUES; + public *; +} +-keepclassmembers class * implements com.bumptech.glide.module.AppGlideModule { + (); +} +-dontwarn com.bumptech.glide.** + +# Gson 2.8.5(米盟广告数据序列化依赖) +-keep class com.google.gson.** { *; } +-keep interface com.google.gson.** { *; } +-keepclassmembers class * { + @com.google.gson.annotations.SerializedName ; +} + +# 米盟 SDK(核心广告组件,完整保留避免加载失败) -keep class com.miui.zeus.** { *; } +-keep interface com.miui.zeus.** { *; } +# 保留米盟日志字段(便于广告加载失败排查) +-keepclassmembers class com.miui.zeus.mimo.sdk.** { + public static final java.lang.String TAG; +} + +# RecyclerView 1.0.0(米盟广告布局渲染依赖) +-keep class androidx.recyclerview.** { *; } +-keep interface androidx.recyclerview.** { *; } +-keepclassmembers class androidx.recyclerview.widget.RecyclerView$Adapter { + public *; +} + +# 其他第三方框架(按引入依赖保留,无则可删除) +# XXPermissions 18.63 +-keep class com.hjq.permissions.** { *; } +-keep interface com.hjq.permissions.** { *; } + +# ZXing 二维码(核心解析组件) +-keep class com.google.zxing.** { *; } +-keep class com.journeyapps.zxing.** { *; } + +# Jsoup HTML解析 +-keep class org.jsoup.** { *; } + +# Pinyin4j 拼音搜索 +-keep class net.sourceforge.pinyin4j.** { *; } + +# JSch SSH组件 +-keep class com.jcraft.jsch.** { *; } + +# AndroidX 基础组件 +-keep class androidx.appcompat.** { *; } +-keep interface androidx.appcompat.** { *; } + +# ============================== 优化与调试配置 ============================== +# 优化级别(平衡混淆效果与性能) +-optimizationpasses 5 +-optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/* + +# 调试辅助(保留行号便于崩溃定位) +-verbose +-dontpreverify +-dontusemixedcaseclassnames +-keepattributes SourceFile,LineNumberTable + diff --git a/powerbell/src/main/res/layout/dialog_networkbackground.xml b/powerbell/src/main/res/layout/dialog_networkbackground.xml index 6f0bed2c..34e7ea74 100644 --- a/powerbell/src/main/res/layout/dialog_networkbackground.xml +++ b/powerbell/src/main/res/layout/dialog_networkbackground.xml @@ -29,7 +29,8 @@ android:ems="10" android:layout_height="wrap_content" android:layout_weight="1.0" - android:id="@+id/et_url"/> + android:id="@+id/et_url" + android:singleLine="true"/>