diff --git a/build.gradle b/build.gradle index 9eb3517..bac8ae9 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ apply plugin: "groovy" apply plugin: "maven" group = "com.jdbernard" -version = "3.7" +version = "3.8" repositories { mavenCentral() } diff --git a/src/main/groovy/com/jdbernard/util/ConsoleProgressBar.groovy b/src/main/groovy/com/jdbernard/util/ConsoleProgressBar.groovy index ddf6301..bb38c00 100644 --- a/src/main/groovy/com/jdbernard/util/ConsoleProgressBar.groovy +++ b/src/main/groovy/com/jdbernard/util/ConsoleProgressBar.groovy @@ -18,6 +18,9 @@ class ConsoleProgressBar { private String lastInfo = "" private long startTime + public void setMax(int max) { + this.max = Math.max(max, 1) } + void update(int value, String info) { if (value == 0 || startTime == 0) startTime = System.currentTimeMillis()