26 lines
954 B
Groovy
26 lines
954 B
Groovy
// 将 install 和 assemble 任务按功能分组
|
|
afterEvaluate {
|
|
|
|
def launcher = [ "fPadLenovo","fPadLenovoOchSweeper", "fPadLenovoOchTaxi", "fPadLenovoOchBus", "fPadLenovoOchBusPassenger", "fPadLenovoOchTaxiPassenger"]
|
|
|
|
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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|