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
b96779ed
authored
Mar 17, 2020
by
pye52
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
现在打包app时会自动将daemon打包到app的assets文件夹内了
parent
4d4606c8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
app/build.gradle
+0
-2
build.gradle
+23
-0
No files found.
app/build.gradle
View file @
b96779ed
...
...
@@ -91,8 +91,6 @@ android {
}
lintOptions
{
checkReleaseBuilds
false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError
false
}
}
...
...
build.gradle
View file @
b96779ed
...
...
@@ -25,6 +25,29 @@ allprojects {
}
}
// 保证daemon会先打包到app的assets文件夹内
task
clean
(
type:
Delete
)
{
delete
rootProject
.
buildDir
Task
appBuildTask
;
Task
daemonBuildTask
;
subprojects
.
forEach
{
project
->
if
(
project
.
name
==
"app"
)
{
Set
<
Task
>
appBuildTasks
=
project
.
getTasksByName
(
"preBuild"
,
false
)
if
(!
appBuildTasks
.
isEmpty
())
{
appBuildTask
=
appBuildTasks
[
0
]
}
}
else
if
(
project
.
name
==
"daemon"
)
{
Set
<
Task
>
daemonAssembleReleaseTasks
=
project
.
getTasksByName
(
"assembleRelease"
,
false
)
if
(!
daemonAssembleReleaseTasks
.
isEmpty
())
{
daemonBuildTask
=
daemonAssembleReleaseTasks
[
0
]
}
}
}
if
(
appBuildTask
!=
null
&&
daemonBuildTask
!=
null
)
{
appBuildTask
.
dependsOn
(
daemonBuildTask
)
appBuildTask
.
mustRunAfter
(
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