Skip to content
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

Document plugin application while in multi-project builds #1201

Closed
MarkRx opened this issue Nov 3, 2023 · 4 comments
Closed

Document plugin application while in multi-project builds #1201

MarkRx opened this issue Nov 3, 2023 · 4 comments
Labels

Comments

@MarkRx
Copy link
Contributor

MarkRx commented Nov 3, 2023

When registering a shared service the registration should be done in the root project or else class loading issues can occur in certain situations in multi-project builds or with script plugins. This can be effectively accomplished by instructing users to apply the docker plugin to the root project before applying it in any child projects.

The class loader exception will look like the following:

Caused by: java.lang.IllegalArgumentException: Cannot set the value of task 'xxx' property 'dockerClientService' of type com.bmuschko.gradle.docker.internal.services.DockerClientService using a provider of type com.bmuschko.gradle.docker.internal.services.DockerClientService.
        at org.gradle.api.internal.provider.AbstractMinimalProvider.asSupplier(AbstractMinimalProvider.java:158)
        at org.gradle.api.internal.provider.DefaultProperty.set(DefaultProperty.java:100)
        at com.bmuschko.gradle.docker.DockerRemoteApiPlugin$2.execute(DockerRemoteApiPlugin.java:47)
        at com.bmuschko.gradle.docker.DockerRemoteApiPlugin$2.execute(DockerRemoteApiPlugin.java:44)
@bmuschko
Copy link
Owner

bmuschko commented Nov 3, 2023

The issue you reported is a duplicate of #1182. It's currently a limitation in Gradle core. I believe they have an issue open for it.

@bmuschko
Copy link
Owner

bmuschko commented Nov 7, 2023

Were you able to set up your project?

@bmuschko
Copy link
Owner

bmuschko commented Nov 7, 2023

I created a note to the documentation with PR #1202.

@big-andy-coates
Copy link

Said note helped me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants