Bob McWhirter James Strachan James Strachan and Bob McWhirter gave birth to Groovy: a dynamic and agile scripting language for the JVM. […] James always used to say that it was all Bob's fault, but indeed, James had so many groovy ideas that it's hard to believe it's not his own fault. He kept saying: "Wouldn't it be groovy if we could do this and that...". Hence the name "Groovy". That's roughly how it all started.
8 Groovy pre-1.0 • Closures available since 2003 on Java 1.4+ • All the nice shortcuts already, inspired by Python & Ruby • native syntax for lists, maps, etc… • Tons of useful methods to simplify common Java boiler-plate code • Initially dynamically-typed only
12 Groovy in 2004 • A brand new parser based on Antlr • after two hand-rolled versions • by John Rose and Jeremy Rainer • Jochen « blackdrag » Theodorou joins the project
31 Groovy++ fork! • Not the first fork, but 3rd • by Alex Tkachman (former G2One co-founder) • Big focus on static compilation • interesting playground for our forthcoming static type checking and static compilation support
42 Groovy 1.7 • Nested and inner classes, and nested static classes • Missing annotation definition support • Power Asserts from Spock • Customize the Groovy Truth! • AST viewer and AST builder • SQL support improvements
54 Groovy 2.0 • Static type checking and static compilation • type inference, flow typing… • « Project Coin » enhancements • binary literals, underscore in numbers, multicatch block • Initial « invoke dynamic » support • Modularity of the Groovy code base with modules
82 Groovy 2.4 — AST transformations • @ToString added includeSuperProperties parameter • Can define compilation phase for @ASTTest • @Synchronized supports explicit static locks used by instance methods if needed • Cleaned-up code for @AutoExternalizable and @EqualsAndHashCode when used with @CompileStatic • Improved Java integration for @Builder • @PackageScope allowed on constructors
83 Groovy 2.4 — Groovysh improvements • Custom .rc and .profile scripts • instanceof completion • Static members completion only in a static context • Completion candidates in color • :set interpreterMode to remember locally-defined variables • :load command supports file names with spaces • Align arguments & flags with the groovy command • Script launch on startup & continue execution of Groovysh • Easier to subclass Groovysh for embedded reuse
93 New committers • Joined the project as committer afterwards • Andrés Almiray • Dierk König • Russel Winder • Shil Sinha • Graeme Rocher • John Wagenleitner
94 Infrastructure • Everything migrated to the Apache infrastructure • Mailing-lists • JIRA • Sources moved to Apache’s Git • with a mirror on Github • Still need to see what we do with the groovy-lang.org website Please Star it!
95 Top Level Project at Apache! • PMC & Incubator PMC voted for graduation • Apache Board agreed to the graduation! • (last November) • Call us Apache Groovy :-) • 2.4.6 was released on February 2016
98 Groovy 2.4.4/5/6 / 2.5 • Improved compiler performance • with an ASM class reader • @Canonical becomes a meta-annotation • More control on the meta-annotation collector • New @MapConstructor transformation • Property validation in transformation parameters • Further AST transformation improvements
100 More control on annotation collector DUPLICATE Annotations from the annotation collection will always be inserted. PREFER_COLLECTOR Annotations from the collector will be added and any existing annotations with the same name will be removed. PREFER_EXPLICIT Annotations from the collector will be ignored if any existing annotations with the same name are found. PREFER_EXPLICIT_MERGED Annotations from the collector will be ignored if any existing annotations with the same name are found but any new parameters on the collector annotation will be added to existing annotations. PREFER_COLLECTOR_MERGED Annotations from the collector will be added and any existing annotations with the same name will be removed but any new parameters found within existing annotations will be merged into the added annotation.
104 Prevent @TupleConstructor default ctors @TupleConstructor(defaults = true) class Person { String first, last int age } Generates only: Person(String first, String last, int age) { /*...*/ }
105 @Immutable support in class hierarchy import groovy.transform.*
@EqualsAndHashCode class Person { String name } @Immutable @TupleConstructor(includeSuperProperties = true) @EqualsAndHashCode(callSuper = true) @ToString(includeNames = true, includeSuperProperties = true) class Athlete extends Person { String sport }
106 Miscellaneous • GDK’s createSimilarCollection() and createSimilarMap() methods support all the JDK’s collections and maps • New File#relativePath(file) method