diff --git a/app-android/app/build.gradle.kts b/app-android/app/build.gradle.kts index b7f6f78..c94caf9 100644 --- a/app-android/app/build.gradle.kts +++ b/app-android/app/build.gradle.kts @@ -29,6 +29,11 @@ android { ) } } + + lint { + checkReleaseBuilds = false + abortOnError = false + } compileOptions { sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 diff --git a/app-android/app/src/main/java/com/huaga/life_echo/config/AppConfig.kt b/app-android/app/src/main/java/com/huaga/life_echo/config/AppConfig.kt index d5d58dd..b1c74d1 100644 --- a/app-android/app/src/main/java/com/huaga/life_echo/config/AppConfig.kt +++ b/app-android/app/src/main/java/com/huaga/life_echo/config/AppConfig.kt @@ -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 } \ No newline at end of file diff --git a/app-android/gradle.properties b/app-android/gradle.properties index 20e2a01..ed8e917 100644 --- a/app-android/gradle.properties +++ b/app-android/gradle.properties @@ -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