Commit b96779ed by pye52

现在打包app时会自动将daemon打包到app的assets文件夹内了

parent 4d4606c8
...@@ -91,8 +91,6 @@ android { ...@@ -91,8 +91,6 @@ android {
} }
lintOptions { lintOptions {
checkReleaseBuilds false 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 abortOnError false
} }
} }
......
...@@ -25,6 +25,29 @@ allprojects { ...@@ -25,6 +25,29 @@ allprojects {
} }
} }
// 保证daemon会先打包到app的assets文件夹内
task clean(type: Delete) { task clean(type: Delete) {
delete rootProject.buildDir 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)
}
} }
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