Commit 06058269 by pye52

优化自动打包脚本

parent 9a9fee77
......@@ -122,6 +122,7 @@ public class QRCodeViewModel extends ViewModel {
// 扫描到的二维码,先检查该订单是否已存在
PayData existsPay = payDataRepository.queryPayDataByPayCode(scanData);
if (existsPay != null) {
LogUtils.w(TAG, "该订单已存在: " + scanData);
qrCodeState.postValue(new QRCodeState(QRCodeState.FAILED, "请不要重复扫码"));
return;
}
......
......@@ -25,24 +25,24 @@ allprojects {
task clean(type: Delete) {
delete rootProject.buildDir
// Task appPreBuildTask;
// Task daemonBuildTask;
//
// subprojects.forEach { project ->
// if (project.name == "app") {
// Set<Task> appPreBuildTasks = project.getTasksByName("preBuild", false)
// if (!appPreBuildTasks.isEmpty()) {
// appPreBuildTask = appPreBuildTasks[0]
// }
// } else if (project.name == "daemon") {
// Set<Task> daemonAssembleReleaseTasks = project.getTasksByName("assembleRelease", false)
// if (!daemonAssembleReleaseTasks.isEmpty()) {
// daemonBuildTask = daemonAssembleReleaseTasks[0]
// }
// }
// }
//
// if (appPreBuildTask != null && daemonBuildTask != null) {
// appPreBuildTask.dependsOn(daemonBuildTask)
// }
Task appPreBuildTask;
Task daemonBuildTask;
subprojects.forEach { project ->
if (project.name == "app") {
Set<Task> appPreBuildTasks = project.getTasksByName("preBuild", false)
if (!appPreBuildTasks.isEmpty()) {
appPreBuildTask = appPreBuildTasks[0]
}
} else if (project.name == "daemon") {
Set<Task> daemonAssembleReleaseTasks = project.getTasksByName("build", false)
if (!daemonAssembleReleaseTasks.isEmpty()) {
daemonBuildTask = daemonAssembleReleaseTasks[0]
}
}
}
if (appPreBuildTask != null && daemonBuildTask != null) {
appPreBuildTask.dependsOn(daemonBuildTask)
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment