Skip to content

Commit

Permalink
Fixed Cannot query the value of task ':dockerBuild' property 'dockerC…
Browse files Browse the repository at this point in the history
…lientService' because it has no value available (#590)
  • Loading branch information
donbeave authored Nov 18, 2022
1 parent 95ef46e commit 32920f8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.micronaut.gradle.docker;

import com.bmuschko.gradle.docker.DockerExtension;
import com.bmuschko.gradle.docker.DockerRemoteApiPlugin;
import com.bmuschko.gradle.docker.tasks.container.DockerCopyFileFromContainer;
import com.bmuschko.gradle.docker.tasks.container.DockerCreateContainer;
import com.bmuschko.gradle.docker.tasks.container.DockerRemoveContainer;
Expand Down Expand Up @@ -50,13 +51,13 @@
public class MicronautDockerPlugin implements Plugin<Project> {
@Override
public void apply(Project project) {
project.getPluginManager().apply(DockerRemoteApiPlugin.class);
project.getPluginManager().apply(MicronautBasePlugin.class);
TaskContainer tasks = project.getTasks();
ExtensionContainer extensions = project.getExtensions();
MicronautExtension micronautExtension = extensions.getByType(MicronautExtension.class);
NamedDomainObjectContainer<MicronautDockerImage> dockerImages = project.getObjects().domainObjectContainer(MicronautDockerImage.class, s -> project.getObjects().newInstance(DefaultMicronautDockerImage.class, s));
micronautExtension.getExtensions().add("dockerImages", dockerImages);
extensions.create("docker", DockerExtension.class);
dockerImages.all(image -> createDockerImage(project, image));
TaskProvider<Jar> runnerJar = createMainRunnerJar(project, tasks);
dockerImages.create("main", image -> {
Expand Down

0 comments on commit 32920f8

Please sign in to comment.