runner icon indicating copy to clipboard operation
runner copied to clipboard

Add Groovy 4

Open FranzMartyn opened this issue 1 year ago • 1 comments

  • Name: Groovy
  • Version: 4 (Potentially Version 4.0.22)
  • Changelog: https://groovy-lang.org/changelogs/changelog-4.0.22.html
  • Release Notes: https://groovy-lang.org/releasenotes/groovy-4.0.html

Groovy 2.5, the currently only version available, came out in 2018 while Version 4 was first released in 2022 and is currently getting new updates. As of writing this, the newest version was released in June 2024. The newer versions of Groovy 4 support Java 17, which is also the newest Java Version supported on Codewars. Due to being compatible with JDK 16+, it brings a lot of nice features from Java:

FranzMartyn avatar Jul 31 '24 18:07 FranzMartyn

2 Other things that would help with a newer Groovy version, especially for writing Test Cases:

  • ArrayList.shuffled() to both shuffle a list and return it afterwards
  • Random.nextInt(int origin, int bound). Currently, a workaround like min + Random.nextInt(max) or random.nextInt(max + 1 - min) + min is required to achieve the same effect

FranzMartyn avatar Jul 31 '24 18:07 FranzMartyn