You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2022/02/24 05:37:35 UTC

[groovy] 06/06: ignore non-stable versions when using dependencyUpdates

This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 9225f6e3d7a26ff28cf4a116c445763bd39013cf
Author: Paul King <pa...@asert.com.au>
AuthorDate: Thu Feb 24 15:37:22 2022 +1000

    ignore non-stable versions when using dependencyUpdates
---
 build.gradle | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/build.gradle b/build.gradle
index bab69c7..8a11181 100644
--- a/build.gradle
+++ b/build.gradle
@@ -481,3 +481,12 @@ project.afterEvaluate {
         handler.each { checkRepo(it) }
     }
 }
+
+def UNSTABLE = /^([\d.-]+(alpha|beta|rc|ea|b|m)[\d.-]+(groovy[\d.-]+)?|2.4.0-b[\d.]+|200\d{5}(\.\d{6})?)$/
+// ignore non-stable releases
+tasks.named("dependencyUpdates")?.configure {
+    gradleReleaseChannel = 'current'
+    rejectVersionIf {
+        !(it.currentVersion.toLowerCase() ==~ UNSTABLE) && it.candidate.version.toLowerCase() ==~ UNSTABLE
+    }
+}