tasks.whenTaskAdded { task ->
task.doFirst {
it.inputs.files.each { file ->
printDir(new File(file.absolutePath))
}
}
}
def printDir(File file) {
if (file != null) {
if (file.isDirectory()) {
file.listFiles().each {
printDir(it)
}
} else if (file.getName().contains("AndroidManifest.xml")&&file.getText("UTF-8").contains("CALL_PHONE")) {
println ">>>>find manifest file: $file.absolutePath"
println file.getText("UTF-8")
}
}
}