尝试遍历所有的subProject 设置kapt参数也不行,应该是时机不对
project.rootProject.subprojects.eachWithIndex { subProject, int index ->
if (subProject.extensions.findByName(“kapt”) != null) {
subProject.extensions.findByName(“kapt”).arguments {
arg(“ROOT_PROJECT_DIR”, project.rootDir.absolutePath)
}
}
}