Hello there. I'm publishing a plugin and have a pr...
# community-support
t
Hello there. I'm publishing a plugin and have a problem: I use composite build ( build-logic ) and include it using
includeBuild
. I have internal plugins in build-logic and public plugins ( ones I want to publish ), the problem is that if I apply gradle-publish plugin to my build-logic, it is going to publish all the plugins to Gradle Plugin Portal ( because all of the plugins will have their pluginMarkers ). In order to avoid that I have to create separate module just for those two plugins. I know one solution and this solution is to still have just one module and publish all of them but Gradle Plugin Portal team will reject internal plugins due to lack of description and 0 usability of plugins, because they are internal and just apply some common libraries and plugins themselves. I would be glad if you provide me with another solution. Here is the GitHub repository to check this out https://github.com/Timbermir/clean-wizard/tree/2.0.0
v
What do you not like with having the public and private plugins in separate projects? That would also make sure the code for the private plugins is not published alongside and also makes it architecturally cleaner as you enforce the proper separation.
t
Problem is that I don't know how to test plugins because gradle-plugins project is not a composite build. Do I have to publish it locally to test ?
or maybe there is some kind of trick that I don't know ?
I was able to test them before because they were in composite build so changes are reflected immediately
v
What hinders you to have it as composite build?
t
The module from composite build is used both in composite build and in root project
I already solved it by publishing it
v
You can import a build in multiple other builds, that should usually not be a problem
t
The idea with multiple composite builds is good. I just included composite build in my another composite build. but how do I import the project from composite build into standard project ? using
implementation(project("build-logic:config"))
doesn't work for me .
t
implementation("project.group:config")
? (where
project.group
is the
group
value configured in that included build) https://docs.gradle.org/current/userguide/composite_builds.html#included_build_declaring_substitutions
☝️ 1
t
Thanks @Thomas Broyer, works like a charm
👌 1