Pil0tXia commented on code in PR #4719: URL: https://github.com/apache/eventmesh/pull/4719#discussion_r1554550548
########## build.gradle: ########## @@ -160,56 +250,60 @@ task zip(type: Zip) { } } -task installPlugin() { - if (!new File("${rootDir}/dist").exists()) { - return - } - String[] libJars = java.util.Optional.ofNullable(new File("${rootDir}/dist/lib").list()).orElseGet(() -> new String[0]) - getAllprojects().forEach(subProject -> { - var file = new File("${subProject.projectDir}/gradle.properties") - if (!file.exists()) { +tasks.register('installPlugin') { + doLast { + if (!new File("${rootDir}/dist").exists()) { return } Review Comment: Good job! "Task configuration avoidance API" is an updated writting and has backward compatibility. IDEA is also warning the outdated writting, so the new writting should be adopted.  --- `doLast()` is also a newer writting, and should be adopted. However, the `printProjects` task is meant to print all modules before each task executes, so I think it doesn't need to apply `doLast()`. So maybe like this:  [What is doLast() for? - Help/Discuss - Gradle Forums](https://discuss.gradle.org/t/what-is-dolast-for/27731/3) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@eventmesh.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@eventmesh.apache.org For additional commands, e-mail: issues-h...@eventmesh.apache.org