Package aQute.bnd.gradle
Class ReleaseCounterService
java.lang.Object
aQute.bnd.gradle.ReleaseCounterService
- All Implemented Interfaces:
AutoCloseable,org.gradle.api.services.BuildService<org.gradle.api.services.BuildServiceParameters.None>
public abstract class ReleaseCounterService
extends Object
implements org.gradle.api.services.BuildService<org.gradle.api.services.BuildServiceParameters.None>, AutoCloseable
A counter helper to determine which task is the last release task.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()intReturs the remaining tasks count.booleanCall during execution by each release task.voidsetInitialCount(int n) Set the initial number of artifacts/tasks from which is counted down.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gradle.api.services.BuildService
getParameters
-
Constructor Details
-
ReleaseCounterService
public ReleaseCounterService()Default public constructor.
-
-
Method Details
-
setInitialCount
public void setInitialCount(int n) Set the initial number of artifacts/tasks from which is counted down.- Parameters:
n- the count
-
isLastReleaseTask
public boolean isLastReleaseTask()Call during execution by each release task. Returns true exactly once: for the last release task that runs.- Returns:
trueif this is the last task to be released
-
getRemaining
public int getRemaining()Returs the remaining tasks count.- Returns:
- the current count of remaining.
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-