.groovy
💻 CodeText-based

.groovy File — Groovy Source Code

text/x-groovy

File Inspector

Drop any file to identify its extension and type — runs entirely in your browser

GROOVY

Drop a .groovy file here or click to choose

Or drop any file to identify its extension

Expected MIME type:text/x-groovy

Quick Facts

Extension.groovy
Full NameGroovy Source Code
MIME Typetext/x-groovy
CategoryCode
TypeText-based (human-readable)
Typical Size1 KB – 50 KB
First Appeared2003

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

IntelliJ IDEA
VS Code
Eclipse
vim
any text editor

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.