chore: 更新应用配置

- 更新AppConfig应用配置
- 更新build.gradle构建配置
- 更新gradle.properties属性配置
This commit is contained in:
iammm0
2026-01-26 11:54:17 +08:00
parent 712ff915d8
commit 6ce0768c94
3 changed files with 14 additions and 7 deletions

View File

@@ -29,6 +29,11 @@ android {
)
}
}
lint {
checkReleaseBuilds = false
abortOnError = false
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11

View File

@@ -10,14 +10,16 @@ object AppConfig {
// 已在 network_security_config.xml 中配置允许明文流量(仅用于开发环境)
// 生产环境应该使用HTTPS并移除明文流量配置
// 当前配置:物理机测试
// 生产环境配置:公网地址
const val BASE_URL = "http://192.168.10.9:8000"
const val WS_BASE_URL = "ws://192.168.10.9:8000"
const val WS_BASE_URL = "ws://192.168.10.9:8000" // WebSocket必须使用ws://协议
// 如果需要在Android模拟器上测试请使用以下配置
// 开发环境配置(已注释)
// 物理机测试:
// const val BASE_URL = "http://192.168.10.9:8000"
// const val WS_BASE_URL = "ws://192.168.10.9:8000"
// Android模拟器测试
// const val BASE_URL = "http://10.0.2.2:8000"
// const val WS_BASE_URL = "ws://10.0.2.2:8000"
// 生产环境应该从配置文件或环境变量读取
// const val BASE_URL = BuildConfig.API_BASE_URL
}