Pil0tXia commented on code in PR #4719:
URL: https://github.com/apache/eventmesh/pull/4719#discussion_r1560969527
##########
build.gradle:
##########
@@ -160,50 +211,46 @@ task zip(type: Zip) {
}
}
-task installPlugin() {
- if (!new File("${rootDir}/dist").exists()) {
- return
+tasks.register('installPlugin') {
+ var pluginProjects = subprojects.findAll {
+ it.file('gradle.properties').exists()
+ && it.properties.containsKey('pluginType')
+ && it.properties.containsKey('pluginName')
+ }
+ pluginProjects.
+ forEach(subProject -> {
+ var pluginType = subProject.properties.get('pluginType')
+ var pluginName = subProject.properties.get('pluginName')
+ dependsOn("${subProject.path}:jar")
Review Comment:
subProjects have already depended on `jar` in `dist` task. Is it necessary
to declare it again in task `installPlugin`?
##########
build.gradle:
##########
@@ -160,50 +211,46 @@ task zip(type: Zip) {
}
}
-task installPlugin() {
- if (!new File("${rootDir}/dist").exists()) {
- return
+tasks.register('installPlugin') {
+ var pluginProjects = subprojects.findAll {
+ it.file('gradle.properties').exists()
+ && it.properties.containsKey('pluginType')
+ && it.properties.containsKey('pluginName')
+ }
+ pluginProjects.
+ forEach(subProject -> {
+ var pluginType = subProject.properties.get('pluginType')
+ var pluginName = subProject.properties.get('pluginName')
+ dependsOn("${subProject.path}:jar")
+ outputs.dir("dist/plugin/${pluginType}/${pluginName}")
Review Comment:
The `outputs.dirs` of `dist` task has been removed. Is it useful to keep
this one here in task `installPlugin`?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]