chore: 打包前清理(Timber release关闭 + 删除内网TODO注释)
1. Timber.DebugTree 只在 DEBUG 模式植入,release 不输出日志 2. 删除 build.gradle.kts 中的内网 IP 注释 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -21,7 +21,6 @@ android {
|
|||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
debug {
|
debug {
|
||||||
// TODO: 内网测试时改回 http://192.168.1.181:8091/
|
|
||||||
buildConfigField("String", "SERVICE_URL", "\"https://app.updatexiaoqu.com:9443/\"")
|
buildConfigField("String", "SERVICE_URL", "\"https://app.updatexiaoqu.com:9443/\"")
|
||||||
// MQTT TCP 连接地址(端口 1883 在 MqttConfig 中定义)
|
// MQTT TCP 连接地址(端口 1883 在 MqttConfig 中定义)
|
||||||
buildConfigField("String", "MQTT_HOST", "\"mqtt.ququbranch.com\"")
|
buildConfigField("String", "MQTT_HOST", "\"mqtt.ququbranch.com\"")
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.xiaoqu.watch.app
|
package com.xiaoqu.watch.app
|
||||||
|
|
||||||
import android.app.Application
|
import android.app.Application
|
||||||
|
import com.xiaoqu.watch.BuildConfig
|
||||||
import dagger.hilt.android.HiltAndroidApp
|
import dagger.hilt.android.HiltAndroidApp
|
||||||
import org.conscrypt.Conscrypt
|
import org.conscrypt.Conscrypt
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
@@ -25,8 +26,10 @@ class WatchApplication : Application() {
|
|||||||
// 解决 Android 8.1 设备连阿里云 OSS 等服务器 TLS 握手失败的问题
|
// 解决 Android 8.1 设备连阿里云 OSS 等服务器 TLS 握手失败的问题
|
||||||
Security.insertProviderAt(Conscrypt.newProvider(), 1)
|
Security.insertProviderAt(Conscrypt.newProvider(), 1)
|
||||||
|
|
||||||
// 2. Timber 日志初始化
|
// 2. Timber 日志(release 不输出,防止信息泄漏)
|
||||||
|
if (BuildConfig.DEBUG) {
|
||||||
Timber.plant(Timber.DebugTree())
|
Timber.plant(Timber.DebugTree())
|
||||||
|
}
|
||||||
|
|
||||||
// 3. 崩溃处理器(记录日志 + 杀进程,系统自动重启 Launcher)
|
// 3. 崩溃处理器(记录日志 + 杀进程,系统自动重启 Launcher)
|
||||||
CrashHandler(this).init()
|
CrashHandler(this).init()
|
||||||
|
|||||||
Reference in New Issue
Block a user