feat: upload latest android source changes

This commit is contained in:
sue
2026-03-03 22:16:30 +08:00
parent c0a7109816
commit 0bf4f72141
56 changed files with 14949 additions and 2152 deletions

View File

@@ -21,103 +21,95 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
lint {
// Keep CI/build running even when lint reports issues.
abortOnError false
checkReleaseBuilds false
}
buildTypes {
release {
// 启用代码混淆和压缩
// Release hardening
minifyEnabled true
// 启用资源压缩
shrinkResources true
// 使用优化的ProGuard配置
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
// 签名配置
// Signing config
signingConfig signingConfigs.debug
// 构建优化
// Build optimization
zipAlignEnabled true
debuggable false
jniDebuggable false
// 构建配置字段
buildConfigField "String", "BUILD_TYPE", "\"release\""
buildConfigField "boolean", "ENABLE_ENCRYPTION", "true"
buildConfigField "boolean", "ENABLE_ANTI_DEBUG", "true"
buildConfigField "boolean", "ENABLE_ROOT_DETECTION", "true"
buildConfigField "boolean", "ENABLE_EMULATOR_DETECTION", "true"
}
debug {
// 调试版本不启用混淆,方便开发
// Easier troubleshooting for local development
minifyEnabled false
shrinkResources false
debuggable true
// 构建配置字段
buildConfigField "String", "BUILD_TYPE", "\"debug\""
buildConfigField "boolean", "ENABLE_ENCRYPTION", "false"
buildConfigField "boolean", "ENABLE_ANTI_DEBUG", "false"
buildConfigField "boolean", "ENABLE_ROOT_DETECTION", "false"
buildConfigField "boolean", "ENABLE_EMULATOR_DETECTION", "false"
}
// 创建增强版本
create("enhancement") {
initWith(getByName("release"))
// 强化混淆配置
// Enhanced release-like profile
minifyEnabled true
shrinkResources true
// 强化构建配置
buildConfigField "String", "BUILD_TYPE", "\"enhancement\""
buildConfigField "boolean", "ENABLE_ENCRYPTION", "true"
buildConfigField "boolean", "ENABLE_ANTI_DEBUG", "true"
buildConfigField "boolean", "ENABLE_ROOT_DETECTION", "true"
buildConfigField "boolean", "ENABLE_EMULATOR_DETECTION", "true"
// 启用更严格的优化
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}
dependencies {
implementation 'com.github.pedroSG94.RootEncoder:library:2.5.4-1.8.22'
implementation 'androidx.core:core-ktx:1.10.1'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.9.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
// 协程支持
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3'
// ✅ Socket.IO v4 官方客户端库
implementation 'io.socket:socket.io-client:2.1.0'
// 网络库
implementation 'org.webrtc:google-webrtc:1.0.32006'
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
// JSON处理
implementation 'org.json:json:20231013'
// 生命周期组件
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.2'
implementation 'androidx.lifecycle:lifecycle-service:2.6.2'
// WorkManager保活 - 使用兼容API 33的版本
implementation 'androidx.work:work-runtime-ktx:2.8.1'
// 测试依赖
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}
}