Groovy

Comprehensive Groovy programming tutorials, examples, and guides. Learn Groovy from beginner to advanced with tested code examples and real-world projects.

Groovy Custom Annotations – Create Your Own with 10 Tested Examples

Groovy custom annotations are versatile. See 10 tested examples covering annotation declaration, retention policies, AST transformations, and runtime processing. “Annotations are metadata that give your code a voice – they tell the compiler, the runtime, and other developers what your intentions are without cluttering your logic.” Joshua Bloch, Effective Java Last Updated: March 2026 | Tested on: Groovy 4.x / 5.x, Java 11+ | Difficulty: Advanced | Reading Time: 18 minutes Groovy ships with a rich set of built-in annotations ... Read More

Groovy Property Files – Read, Write, and Manage Config with 10 Tested Examples

Working with Groovy property files is simple. See 10 tested examples to read, write, merge properties, use defaults, and convert between formats on Groovy 5.x. “Configuration is the soul of every application. Get it wrong and nothing works. Get it right and nobody notices.” Dave Thomas, The Pragmatic Programmer Last Updated: March 2026 | Tested on: Groovy 5.x, Java 17+ | Difficulty: Beginner to Intermediate | Reading Time: 14 minutes Every application needs configuration. Database URLs, API keys, feature flags, ... Read More

Groovy Shell (groovysh) – Interactive REPL with 10 Tested Examples

The Groovy Shell (groovysh) REPL is covered here with 10 tested examples. Learn commands, tab completion, multi-line input, imports, and scripting tips on Groovy 5.x. “The best way to learn a language is to have a conversation with it. A REPL is that conversation.” Brian Kernighan, The Unix Programming Environment Last Updated: March 2026 | Tested on: Groovy 5.x, Java 17+ | Difficulty: Beginner | Reading Time: 14 minutes If you’ve installed Groovy and want a quick way to experiment ... Read More