Groovy
All articles
About the course
Groovy is a language for the Java platform: it compiles to the same bytecode as Java, uses the Java libraries without a wrapper, and drops the ceremony a script does not need. The course below is a chain of lessons. Each one takes one idea, shows whole scripts with their real output, and names the lesson before it and the lesson after it.
Every script was run in this container with Groovy 5.0.8 on OpenJDK 21.0.13, and every output block is copied from that run. The lint checks use CodeNarc 4.0.0 with the ruleset of this site, so the code the lessons show is also the code the linter accepts. There is no network: a lesson that would need a repository or a server shows the failure it gets instead of pretending it works.
Gradle build scripts are Groovy, and the Groovy DSL lesson of that course reads one line by line. The Groovy errors page collects the messages a beginner meets with their causes, and the older Groovy overview is kept as it was.
Related
- Gradle: the build tool written in Groovy, with its own course.
- Java: the platform Groovy runs on and the language it extends.
- Scala: the typed language of the same platform, with its own course.
- JUnit 5: the test platform Spock and the JUnit lessons use.
- Groovy errors: the messages and what causes them.