feat: 优化管控

This commit is contained in:
2026-06-24 14:50:33 +08:00
parent d0180b77d4
commit 73dda737d8
8 changed files with 664 additions and 888 deletions

View File

@@ -15,7 +15,7 @@ android {
buildToolsVersion "29.0.3"
defaultConfig {
minSdkVersion 24
minSdkVersion 26
targetSdkVersion 29
multiDexEnabled true
@@ -63,8 +63,8 @@ android {
official {
flavorDimensions "default"
versionCode 88
versionName "3.4.8"
versionCode 89
versionName "3.4.9"
applicationId "com.fuying.sn"
buildConfigField "String", "ROOT_URL", '"https://as.fuyingy.com/android/"'
@@ -570,6 +570,22 @@ project.afterEvaluate {
}
}
tasks.register('deleteAppSourceWhiteList', Exec) {
// Windows 系统使用 cmd /c, Mac/Linux 使用 sh -c
if (System.properties['os.name'].toLowerCase().contains('windows')) {
commandLine 'cmd', '/c', 'adb', 'shell', 'settings', 'delete', 'system', 'app_source_white_list'
} else {
commandLine 'adb', 'shell', 'settings', 'delete', 'system', 'app_source_white_list'
}
// 即使命令执行失败也不中断构建(可选,防止因为没连手机导致编译失败)
ignoreExitValue = true
doLast {
println "ADB command executed: settings delete system app_source_white_list"
}
}
//preBuild {
// doLast {
// def imlFile = file(project.name + ".iml")