bmuschko / gradle-docker-plugin

Gradle plugin for managing Docker images and containers.
https://bmuschko.github.io/gradle-docker-plugin/current/user-guide/
Apache License 2.0
1.23k stars 361 forks source link

Incompatible with Avro/Lombok plugins #1207

Closed austek closed 9 months ago

austek commented 10 months ago

Unable to load the project when multiple modules are using the plugin and at least one of the modules is using either/both of the following plugins

Expected Behavior

running ./gradlew dockerBuildImage build two docker images

Current Behavior

./gradlew clean dockerBuildImage

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':stock'.
> Could not create task ':stock:dockerBuildImage'.
   > Cannot set the value of task ':stock:dockerBuildImage' property 'dockerClientService' of type com.bmuschko.gradle.docker.internal.services.DockerClientService using a provider of type com.bmuschko.gradle.docker.internal.services.DockerClientService.

here is a build scan https://scans.gradle.com/s/iwbfxycgg4cbc

Context

Tying to build a docker image for each module

Steps to Reproduce (for bugs)

a self-contained example project is at https://github.com/austek/event-service

Your Environment

This is produced both on

bmuschko commented 10 months ago

See the note in the documentation here: https://bmuschko.github.io/gradle-docker-plugin/current/user-guide/#applying_the_plugin_using_the_plugin_dsl. You need to apply the plugin in a specific way when using it in a multi-project build. That's a limitation of Gradle.

bmuschko commented 9 months ago

Closing as I didn't get any more response on the issue.