Pil0tXia commented on code in PR #4719:
URL: https://github.com/apache/eventmesh/pull/4719#discussion_r1561250063
##########
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:
>Is `installPlugin` always called after `dist`?
Yes, that's what everyone executed builds before I got involved in the
community (according to
[document](https://eventmesh.apache.org/docs/instruction/runtime/#run-in-a-jdk11-environment)).
>If so, it should probably depend on it.
IMO, since `jar` tasks have already been executed in `dist` task, so they
shouldn't be executed again in task `installPlugin`, just as the original
`installPlugin` task didn't do that either.
>would create a base distribution with just a single plugin
That's a good idea, but I'm not sure if anyone does this though, because
trying to remember the exact name of a plugin is difficult, there are a lot of
plugins, and the vast majority of api's require a default plugin.
After you reminded me of this, I realized that the `installPlugin` task is
actually doing the work of the `installPlugins` task. However, considering that
we don't need an `installPlugin` task, changes to the task would involve
multiple changes to documentation, CI, etc., so I don't think it's really
necessary.
--
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]