26 lines
920 B
Groovy
26 lines
920 B
Groovy
// 将 install 和 assemble 任务按功能分组
|
|
afterEvaluate {
|
|
|
|
def launcher = ["f80x", "f8xx", "f8amap", "fochtaxi", "fochbus", "fPadLenovo", "fPadLenovoOchTaxi", "fPadLenovoOchBus"]
|
|
|
|
it.getTasks().iterator().forEachRemaining {
|
|
def task = it
|
|
def taskName = task.name
|
|
if (taskName.startsWith("assemble")
|
|
&& (taskName.endsWith("Debug") || taskName.endsWith("Release"))) {
|
|
launcher.forEach {
|
|
if (taskName.toLowerCase().contains(it)) {
|
|
task.group = "assembleLauncher"
|
|
}
|
|
}
|
|
} else if (taskName.startsWith("install")
|
|
&& (taskName.endsWith("Debug") || taskName.endsWith("Release"))) {
|
|
launcher.forEach {
|
|
if (taskName.toLowerCase().contains(it)) {
|
|
task.group = "installLauncher"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|