From cfaf15c1dc129cdb8dd4ff6931b15de52db66fd6 Mon Sep 17 00:00:00 2001 From: "Joker.X" Date: Sun, 30 Nov 2025 12:22:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=20xxp=20=E6=9D=83=E9=99=90?= =?UTF-8?q?=E6=A1=86=E6=9E=B6=E7=89=88=E6=9C=AC=E4=BB=A5=E5=8F=8A=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=B7=B7=E6=B7=86=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle.kts | 8 ++++++-- app/proguard-rules.pro | 8 +++++++- gradle/libs.versions.toml | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 3c9dfa8..4ca3af1 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -96,7 +96,9 @@ android { // signingConfig = signingConfigs.getByName("common") // debug 模式下包名后缀 applicationIdSuffix = ".debug" + // debug 模式下的请求 url 地址 buildConfigField("String", "BASE_URL", "\"https://box.dusksnow.top/app/\"") + // 根据当前构建类型是否为 debug 模式来判断是否开启 debug 模式 buildConfigField("Boolean", "DEBUG", "true") } @@ -108,13 +110,15 @@ android { isShrinkResources = true // 正式发布模式下的签名配置(配置完 common 签名配置后,取消注释以下行) // signingConfig = signingConfigs.getByName("common") + // 正式发布模式下的请求 url 地址 + buildConfigField("String", "BASE_URL", "\"https://box.dusksnow.top/app/\"") + // 根据当前构建类型是否为 debug 模式来判断是否开启 debug 模式 + buildConfigField("Boolean", "DEBUG", "false") // 混淆规则文件 proguardFiles( getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" ) - buildConfigField("String", "BASE_URL", "\"https://box.dusksnow.top/app/\"") - buildConfigField("Boolean", "DEBUG", "false") } } diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 481bb43..4bb46a7 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -18,4 +18,10 @@ # If you keep the line number information, uncomment this to # hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file +#-renamesourcefileattribute SourceFile + +# toast 混淆规则 +-keep class com.hjq.toast.** {*;} + +# xxp权限混淆规则 +-keep class com.hjq.permissions.** { *; } \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 0bcd0d9..f44a412 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -87,7 +87,7 @@ toaster = "13.2" # 权限 # XXPermissions 权限框架: https://github.com/getActivity/XXPermissions -xxpermissions = "26.5" +xxpermissions = "28.0" # 数据存储 # 腾讯 MMKV 高性能存储: https://github.com/Tencent/MMKV