groovy
Installation
SKILL.md
Groovy
Groovy v4 adds Switch Expressions, Records, and Sealed Types. It remains the key to Gradle and Jenkins Pipelines.
When to Use
- Build Automation: Writing
build.gradlescripts. - CI/CD: Writing Jenkinsfiles.
- Scripting JVM: Interacting with Java libraries dynamically.
Core Concepts
Closures
{ item -> item.name }. The core functional primitive.
Dynamic Typing
def x = 1. (Though @CompileStatic can force types).