Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
huangzhicong
/
SmartCanteen
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
06058269
authored
Mar 20, 2020
by
pye52
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化自动打包脚本
parent
9a9fee77
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
20 deletions
+21
-20
app/src/main/java/com/bgycc/smartcanteen/viewModel/QRCodeViewModel.java
+1
-0
build.gradle
+20
-20
No files found.
app/src/main/java/com/bgycc/smartcanteen/viewModel/QRCodeViewModel.java
View file @
06058269
...
...
@@ -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
;
}
...
...
build.gradle
View file @
06058269
...
...
@@ -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
)
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment