Hello! How can I apply a plugin that is only avail...
# gradle
t
Hello! How can I apply a plugin that is only available through another plugin? The case is one jar containing all plugins, and explanation in comments 👇
To elaborate, I have created a custom gradle plugin for internal projects, where the projects mostly have a structure like this;
Copy code
root/
    - client/
    - server/
The plugin is then applied using the plugins dsl to the root project, e.g. like this;
Copy code
plugins {
    id("com.example.plugin") version "1.0"
}
From there, I can apply the "com.example.plugin.{client|server}" to the subprojects using the plugins dsl - but how can I apply f.ex. the server plugin to the root project? Should I publish three different plugins, or is here some way? Ideally, I would be able to do this in the root project;
Copy code
plugins {
    id("com.example.plugin") version "1.0"
    id("com.example.plugin.server")
}
Or similar using the apply dsl.
w
i have done something similar, where there are 2 different plugins, and you apply the appropriate one on each subproject
trying to do it all from the root caused some issues that were hard to work around
but id be interested if you figure it out