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
}

View File

@@ -6,7 +6,7 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2,TLSv1.3
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. For more details, visit
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects