Skip to content
26 changes: 23 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ dependencies

// Builtin FTP Server - 最新版(用于数据备份)
// 注意:不需要显式添加 ftpserver 依赖,builtinftp 会通过传递依赖自动引入正确版本
implementation 'com.github.hxcan:builtinftp:2026.3.29'
implementation 'com.github.hxcan:builtinftp:2026.3.31'

// 🔍 FIX: Explicitly add ftpserver 2026.3.39 to override transitive dependency
// This includes the LIST command fix (endsWith("/") check)
// Remove this line after builtinftp is updated to depend on ftpserver 2026.3.39+
implementation 'com.github.hxcan:ftpserver:2026.3.39'
}

android
Expand Down Expand Up @@ -103,10 +108,10 @@ android
versionName "2026.3.26"
multiDexEnabled true

// 配置支持的 SO 库架构
// 配置支持的 SO 库架构 - 仅保留手机端需要的架构
ndk
{
abiFilters "armeabi", "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
abiFilters "armeabi", "armeabi-v7a", "arm64-v8a"
}
}

Expand Down Expand Up @@ -151,4 +156,19 @@ tasks.withType(JavaCompile).configureEach {
'--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED',
'--add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED',
]
}
// 自定义 APK 输出文件名,包含版本信息
android.applicationVariants.all { variant ->
variant.outputs.all { output ->
def versionName = variant.versionName
def versionCode = variant.versionCode
def buildTime = new Date().format('yyyyMMdd-HHmmss', TimeZone.getTimeZone('Asia/Shanghai'))
def buildType = variant.buildType.name

if (buildType == 'debug') {
outputFileName = "sisterfuture-debug-v${versionName}-${versionCode}-${buildTime}.apk"
} else {
outputFileName = "sisterfuture-release-v${versionName}-${versionCode}-${buildTime}.apk"
}
}
}