Groovy is an object-oriented programming language for the Java platform. It is a dynamic language with features similar to those of Python, Ruby, Perl and Smalltalk. It can be used as a scripting language for the Java platform.
Apache Groovy is a powerful, optionally typed and dynamic language, with static-typing and static compilation capabilities, for the javaplatform aimed at improving developer productivity thanks to a concise, familiar and easy to learn syntax. It integrates smoothly with any javaprogram, and immediately delivers to your application powerful features, including scripting capabilities, Domain-Specific Language authoring, runtime and compile-time meta-programming and functional programming.
Groovy is an object-oriented, agile and dynamic language for the Java Virtual Machine. It builds upon the strengths of java but has additional power features inspired by languages like python, rubyand smalltalk. It makes modern programming features available to java developers with almost zero learning curve. It can be used as a scripting language for the javaPlatform. From Wikipedia
Flat learning curve:
Concise, readable and expressive syntax, easy to learn for java developers
Powerful features:
Closures, builders, runtime & compile-time meta-programming, functional programming, type inference, and static compilation
Smooth Java integration:
Seamlessly and transparently integrates and interoperates with javaand any third-party libraries
Domain-Specific Languages:
Flexible & malleable syntax, advanced integration & customization mechanisms, to integrate readable business rules in your applications
Vibrant and rich ecosystem:
Web development, reactive applications, concurrency / asynchronous / parallelism library, test frameworks, build tools, code analysis, GUI building
Scripting and testing glue:
Great for writing concise and maintainable tests, and for all your build and automation tasks
Hello World
println 'Hello World'
Tools
- grails (project page) - web framework powered by groovy, that builds on top of spring and hibernate
- gradle (project page) - build automation tool powered by Groovy
- griffon (project page) - application framework for developing desktop applications in the jvm
- IDE plugins - plugins that provide Groovy support for IDEs such as Eclipse
- GGTS - complete Eclipse-based IDE optimized for groovy and grails applications
- SdkMan - SDK Manager (formerly: GVM) a package manager for JVM-based SDKs, frameworks, and tools such as Groovy, Grails, JDK, Gradle, etc.
- posh-gvm - powershellcli based on the groovy enVironment Manager (GVM).
- Gant - a tool for scripting anttasks using groovy instead of xml to specify the logic.
Online Resources
- Groovy Homepage
- Beginners Tutorial
- The Getting Started Guide
- Groovy APIs
- JavaDoc pages for Groovy Development Kit
- Execute Groovy Programs Online
Groovy compared to other languages
On January 19, 2015 Pivotal announced end of their sponsorship to Groovy and Grails. Groovy was then submitted to become a project at the Apache Software Foundation. On November 18, 2015 the Groovy project graduated from Apache Project Incubation becoming an official Apache project.