.groovy File — Groovy Source Code
text/x-groovy
Drop any file to identify its extension and type — runs entirely in your browser
Drop a .groovy file here or click to choose
Or drop any file to identify its extension
text/x-groovyQuick Facts
| Extension | .groovy |
| Full Name | Groovy Source Code |
| MIME Type | text/x-groovy |
| Category | Code |
| Type | Text-based (human-readable) |
| Typical Size | 1 KB – 50 KB |
| First Appeared | 2003 |
What Is a .groovy File?
Groovy is a dynamic programming language for the Java Virtual Machine that enhances Java with features from Python, Ruby, and Smalltalk while maintaining seamless Java interoperability. GROOVY files contain source code in a language that supports both static and dynamic typing, closures, operator overloading, native syntax for lists and maps, string interpolation, the safe navigation operator (?.), and a powerful metaprogramming system. Groovy is optionally typed — any valid Java code is also valid Groovy, enabling gradual adoption. The language is the foundation of the Gradle build system (the standard for Android and many JVM projects), the Jenkins CI/CD pipeline scripting language (Jenkinsfile), and the Grails web framework. Groovy's scripting capabilities make it popular for automation, testing (Spock testing framework), and DSL creation. The language's builders (MarkupBuilder, JsonBuilder, SwingBuilder) provide elegant APIs for constructing complex data structures. Groovy can be compiled to Java bytecode, run as scripts, or executed interactively through the Groovy Console. The AST transformation feature enables compile-time metaprogramming for annotations like @Immutable, @Builder, and @Sortable.
How to Open .groovy Files
Related File Extensions
More Code File Extensions
Other code formats you might encounter
Browse File Extensions by Category
Explore our reference of 259 file extensions with details, programs, and related formats.