-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Isolation in multi-project build #81
Comments
That's not entirely true. You only need to configure
I'm afraid not. The alternative to a root project plugin would be to convert it into a settings plugin but that wouldn't achieve isolation, either. |
Thanks Marc for your prompt reply, The point is if I move
|
@flelli It shouldn't break without any defined publications. Could you please create a reproducer project? |
Sure. In my project I created two additional branches:
As soon as I run Gradle using the plugin in the root project, I get:
As you can see in the |
The
|
This probably break the future Gradle project isolation support, right? What if the plugin must be applied to each project? |
@vlsi hi, could you able to find any workaround for pre-compiled script plugins (organized as part of
|
Like @flelli, I bumped into the following problem:
This problem occurred when I had two projects I wanted to publish independently using the Gradle nexus publish plugin. One project depended on the other, though: it was a multi-build project through the setting Following @sureshg's suggestion, I found two workarounds for the above problem:
For future reference, I'll post both (most likely imperfect but functioning) workarounds below. Conditional plugin applicationMain projectsettings.gradle.kts:
build.gradle.kts:
Other projectbuild.gradle.kts:
Composite buildMain projectsettings.gradle.kts:
build.gradle.kts:
Other projectbuild.gradle.kts:
|
@marcphilipp would you mind listing the actual reasons why the plugin has to be a root or settings plugin? |
I originally made it a root project plugin so there's a single place to configure Nexus repositories that are shared across subprojects. While each subproject has an "init" task, they use a resource attached to the project to synchronize on to ensure a shared staging repo is created. This could probably be changed to create a checksum of the repo config or require some kind of identifier and a |
Hi,
I have a polyglot multi-project build where sub projects are isolated by technology. Say I have 2 subprojects:
modules:go
modules:java
The reason I do this is also because I want the tools and plugins to be isolated. With the former 2 plugins I had them applied only in the
modules:java
along with Maven, the publishing, etc but the new one fails to apply if not declared in the root project:`Failed to apply plugin 'io.github.gradle-nexus.publish-plugin'.
Moving the plugin to the root project also implies declaring all the publishing etc in the root project and that would mess up all the configurations I have, basically giving up on isolation.
Is there a way to keep the new plugin in a sub-project?
The text was updated successfully, but these errors were encountered: