Document plugin application while in multi-project builds
MarkRx opened this issue · 4 comments
MarkRx commented
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 commented
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 commented
Were you able to set up your project?
big-andy-coates commented
Said note helped me :)