Skip to content

Commit

Permalink
feat: Delete multiple images.
Browse files Browse the repository at this point in the history
Possible close bmuschko#1190
  • Loading branch information
red55 committed Oct 5, 2023
1 parent 7042649 commit 81a46bf
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,15 @@
package com.bmuschko.gradle.docker.tasks.image;

import com.bmuschko.gradle.docker.tasks.AbstractDockerRemoteApiTask;
import com.fasterxml.jackson.databind.annotation.JsonAppend;
import com.github.dockerjava.api.command.RemoveImageCmd;
import groovy.lang.Closure;
import org.gradle.api.Action;
import org.gradle.api.internal.provider.PropertyFactory;
import org.gradle.api.model.ObjectFactory;
import org.gradle.api.provider.ListProperty;
import org.gradle.api.provider.Property;
import org.gradle.api.provider.Provider;
import org.gradle.api.provider.ProviderFactory;
import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.Optional;
import org.gradle.api.internal.provider.DefaultProperty;
import org.gradle.internal.lazy.Lazy;

import java.util.List;
import java.util.concurrent.Callable;
Expand All @@ -39,7 +34,7 @@ public class DockerRemoveImage extends AbstractDockerRemoteApiTask {
private final ObjectFactory objects = getProject().getObjects();
private final Property<String> imageId = objects.property(String.class);

private final void issueDeprecationWarning(String propertyName) {
private void issueDeprecationWarning(String propertyName) {
getLogger().warn("[DEPRECATED] DockerRemoveImage.{} is deprecated. Please use DockerRemoveImage.{}s.", propertyName, propertyName);
}

Expand Down Expand Up @@ -126,10 +121,7 @@ public void targetImageIds(Closure<List<String>> imageIds) {
}

public void targetImageIds(List<String> imageIds) {
Callable<List<String>> task = () -> {
return imageIds;
};
setTargetImageIds(task);
setTargetImageIds(() -> imageIds);
}

@Input
Expand Down

0 comments on commit 81a46bf

Please sign in to comment.