A multi-faceted language tool for the Java platform!

Groovy

Groovy

  -  59.22 MB  -  Open Source
  • Latest Version

    Groovy 5.0.0 LATEST

  • Review by

    Daniel Leblanc

  • Operating System

    Windows 7 / Windows 8 / Windows 10 / Windows 11

  • User Rating

    Click to vote
  • Author / Product

    Apache Software Foundation / External Link

  • Filename

    groovy-5.0.0.msi

  • MD5 Checksum

    c0249d23b780836374216b27d5ce500e

Apache Groovy is a powerful, optionally typed and dynamic language, with static-typing and static compilation capabilities, for the Java platform aimed at improving developer productivity thanks to a concise, familiar, and easy to learn syntax.

It integrates smoothly with any Java program and immediately delivers to your application powerful features, including scripting capabilities, Domain-Specific Language authoring, runtime, and compile-time meta-programming and functional programming.

Features and Highlights

Flat learning curve
Concise, readable, and expressive syntax, easy to learn for Java developers.

Smooth Java integration
Seamlessly and transparently integrates and interoperates with Java and any third-party libraries.

Vibrant and rich ecosystem
Web development, reactive applications, concurrency / asynchronous / parallelism library, test frameworks, build tools, code analysis, GUI building.

Powerful features
Closures, builders, runtime & compile-time meta-programming, functional programming, type inference, and static compilation.

Domain-Specific Languages
Flexible & malleable syntax, advanced integration & customization mechanisms, to integrate readable business rules in your applications.

Scripting and testing glue
Great for writing concise and maintainable tests, and for all your build and automation tasks.

The Groovy programming language is supported by the Apache Software Foundation and the Groovy community.

How to Use
  • Open a terminal or command prompt on your PC
  • Set up the Groovy environment variables if needed
  • Run Groovy scripts using the groovy command
  • Use the interactive shell with groovysh for quick testing
  • Integrate Groovy with Java applications if required
  • Utilize Groovy libraries for advanced scripting
  • Debug scripts using logging and exception handling
  • Explore documentation for built-in functions and syntax
System Requirements
  • OS: Windows 11 or Windows 10 (64-bit recommended)
  • Processor: Intel/AMD 1.5 GHz or faster
  • RAM: Minimum 2GB (4GB or more recommended)
  • Storage: At least 500MB free space
  • Java: JDK 8 or later required
PROS
  • Easy to learn for Java developers
  • Supports dynamic and static typing
  • Compatible with Java libraries and frameworks
  • Concise and expressive syntax
  • Strong community and documentation
CONS
  • Slower execution than pure Java
  • Requires Java runtime installation
  • Limited standalone development tools
  • Not as widely used as Java or Python
  • Can be harder to debug in complex projects


Why is this app published on FileHorse? (More info)
  • Groovy 5.0.0 Screenshots

    The images below have been resized. Click on them to view the screenshots in full size.

    Groovy 5.0.0 Screenshot 1

What's new in this version:

Fixed:
- Wrong LUB when involving a numeric constant and null
- STC misses type error when involving a variable with a char a declared type
- STC involves improper subtyping rules for parameterized types with wildcard types
- No compiler error for class that implements interfaces with duplicated default methods
- Extension method getProperties() returns raw map
- MissingMethodException using method-pointer operator in superclass
- TypeChecked/CompileStatic wildcard problems
- Java static interface methods cannot be located using property notation in dynamic context
- Return statement insertion generates unnecessary dynamic cast
- STC: closure array or varargs parameter not properly type-checked
- StackOverflowError when calling a static method.
- Compiler does not resolve compile-time constants in string concatenation
- ClassNode setSuperClass and setInterfaces should update usingGenerics
- Multiple @CompileStatic annotations don't combine extensions
- Declared generic parameter on method not transferred to Closure
- The % operator returns unexpected results for negative numbers for BigIntegers *
- Missing errors for improper enum declaration *
- STC: Cannot choose between TimeDuration#plus(Duration) and Duration#plus(TimeDuration)
- STC method reference return type checking
- Annotation default set for every binary method *
- STC doesn't find property accessor on nested class
- STC accepts program although constructor reference is invalid
- Patterns conditionally created using pattern operator ~ are cast to String/GString
- STC is looking for the wrong constructor reference
- Fail to perform SAM conversion using method references
- STC rejects program when passing method reference in parameterized function
- Precedence of self property over outer class field *
- CompileStatic & Elvis operator: Cannot assign literal value of type (java.lang.Number or java.lang.Comparable) to variable of type double
- NPE when checking compatibility of method reference
- Static compiler does not coerce Groovy truth from closures
- SC internal error when spreading inside list literal
- Compiler error related to getAt and interface methods
- Cannot infer type of parameterized method when dealing with arrays
- return first nested interface when GroovyClassLoader.parseClass parse interfaces with nested interfaces
- unexpected error when having overloaded methods, one of which receiving an Iterable
- implicit-this access within closure to private members in declaring class when invoked from derived class
- MissingPropertyEx when accessing private static field in closure of same class
- Class parsing does not set erasure of type param with bounds
- Fix edge cases for SecureASTCustomizer
- JSR308 constructor call annotations not resolved or available
- JSR308 inline constants for annotations in class header
- Regression: STC loses track of package-scope constants
- Primitive array Varargs Java incompatibility
- each after transpose with 2 arguments does not compile
- STC LUB of List and Set is not Collection for Java 21
- Code that causes Groovy Compiler Crash
- ambiguous method error for tap on null receiver
- access to public static variable forbidden in enum
- inner class cannot set property of enclosing class that has a getter without a setter
- JsonSlurper parses badly format JSON without throwing exception
- Concatenated strings not treated as compile-time constants
- STC rejects concatenated string as annotation parameter
- XmlUtil escapeControlCharacters escapes control characters 0-30 instead of 0-31
- Access to private fields of superclass from a block fails in subclass
- STC: error message for inaccessible setter is not too helpful
- Reconsider name duplication for groovysh *
- VerifyError for explicit this parameter and default argument(s)
- Regression in STC generics solution
- Compiler crash: ClassNode#getTypeClass for TemporalAccessor called before the type class is set
- Fail to identify direct call of abstract method
- [STC] Cannot detect the type of Optional in some cases
- AssertJ collection mapping is badly supported
- Runtime rehydrate error for closure in interface default method
- GroovyClassDoc has empty 'enumConstants' when call method GroovyDocParser.getClassDocsFromSingleSource(...)
- Fail to identify updates on final variables declared in default methods
- Not reporting error when implicit default constructor is private
- Generated size() method on records performs unnecessary boxing
- Generated toList() and toMap() methods on records perform unnecessary wrapping
- Extraneous bytecode generated after calls to void methods
- Unnecessary bytecode generated after variable assignment
- STC: multiple instanceof checks produce different results
- Class without sealed parent cannot be non-sealed
- Error "BUG! At this point argument array length and parameter array length should be the same"
- shuffled modifies input array
- Fail to identify duplicate constructor declaration
- ClassNode getField(String), getMethods(String) and others return from super interface when class uses extends
- References to inaccesible methods with static compilation leads to runtime error
- Method call with type args loses information within trait
- The script running reports a null pointer.
- DefaultGroovyMethods#unique now returns null for empty or 1 element input
- Groovy Closure not retaining param annotations, but only for the default single object param case
- Closure owner seems to be overwritten
- Access to a private property of a parent object is not caught
- Interface default method and static import precedence
- @NamedVariant self referential default values are not correctly resolved when calculations are involved
- Groovy 4.0.19 - Unable to start (picocli)
- Class using trait and @Immutable and allProperties gives BUG! exception in phase 'canonicalization' NPE
- STC: for loop element type inference with multiple instanceof
- AutoImplement and method with default arguments
- @CompileStatic: Compilation fails due to a synthetic bridge method in the subclass
- Reference to this in ctor before this/super call false positive
- SC: variable initialized to null and assigned primitive value in loop
- STC: missing property error for implicit-this reference to private super field or method
- Package-private field and method or property have different treatment *
- STC: error for abstract class private or package-private field access
- implicit type of catch parameter is written as Object
- Bootstrap method error for method reference used with a primitive literal
- STC loses generic specialization on inheritance
- IllegalAccessError when using protected method as reference
- STC: callable (closure) property from super class
- STC: map properties "class" and "empty" indicated as read-only
- unsafe conversion of array of reference type to an array of primitive type
- STC: write property via extension method
- IllegalAccessError writing package-private property of other-package map-based type
- Power binary expression finds incorrect type - currently uses declaration inferred type
- SC: put entry replaced write field for public and protected of map-based type
- array or collection coercion of non-collection iterable produces single-element result
- STC: property reference to generated method not recognized
- STC: field and interface default method accessor property
- incorrect comparison is missed by the compiler
- STC: map property access within closure
- reference to the constructor of an abstract class is not detected
- STC: closure property precedence
- STC: error for non-static member of class delegate
- STC: zero-parameter closure call with args
- STC: inferred type of closure delegate, owner and thisObject
- STC: closure parameter metadata after re-assignment of variable
- STC: inferred type of name within closure (delegate property versus owner field) *
- STC: inferred type of this.name within closure
- SC: outer class field and self dynamic property
- ClassNode makeArray() and make(Type[].class) differences
- unexpected crash in class generation "On receiver: x with message: getAt and arguments: 0"
- [GINQ] Some non-ascii characters in ascii table can not align correctly in console
- STC: loss of precision check for typecast number literals
- invalid reference to an array constructor leads to type unsafe results
- General error during canonicalization when having closure with default args
- flow typing can lead to type unsafe results when having nested ifs
- IncompatibleClassChange with map-style constructor and overloaded setters
- Spread-safe operator differences and efficiencies *
- STC does not properly handle try/catch in flow typing leading to type unsafety
- weak hashing algorithm (使用弱哈希算法)
- Failed to find method when using method reference on a class field
- Empty execute method in groovy.sql.Sql
- Assignments in closures can introduce issues in flow typing
- flow typing on loops can introduce type unsafety
- crash when annotating a lambda parameter
- Cast exception when using qualified this in lambda
- anonymous inner class visibility *
- reference to outer class non-private static field before special ctor call
- undefined default constructor of outer class causes runtime exception
- DGM flatten return type is often incorrect
- ClassCastException when assigning a lambda returning null into a SAM expecting a primitive
- "class" and "empty" listed as map properties
- Inconsistent isAttribute & getAttribute behavior in Groovy 4 with traits
- Possible Null Pointer Dereference in VariableScopeVisitor.java
- Error with circular loading of installed providers when using transitive dependency groovy 4.0.23 in docker
- False positive "Can't have an abstract method in a non-abstract class." when implement Java interfaces
- False negative "name clash" when method in child class changes a type argument
- org.abego.treelayout:org.abego.treelayout.core dependency should be runtimeOnly
- BUG! exception in phase 'instruction selection' of @CompileStatic method
- Invalid compiler error for class which overrides a method having duplicate default definitions from interfaces
- final class property is not reported as final in its MetaProperty#modifiers
- CompileStatic does not detect type mismatch on "+="
- SC: call site writer makes reference to removed method
- empty if/else seems to confuse the parser
- Field transform does not handle closure or anonymous class in assert, return, etc.
- Call to private method fails when using Custom MetaClass
- Groovy 4/5 not working in OSGi container
- STC: spread on non-iterable type causes compiler error
- Reproduction of GROOVY-11548 with Generic Parameters
- byte array casted to array list when calling parent method from nested class
- instanceof with parameterized type
- safe call evaluates arguments
- for loop variable modifiers
- STC: element type of enum class
- Static compiler should treat inner records as static
- Nested <src> in <groovyc> Ant task is not handled nicely
- Calls to the outer class's super from an inner class does not work
- Enums in switch/case statements that are not fully qualified will cause a groovy compile error but Java requires enums to "not" be fully qualified
- Functions that take var args will default the type of the first argument, java tries to find the common parent type from all arguments
- Assigning null to a List or Map using bracket notation does not work with @CompileStatic
- Default values for array members in annotations
- Unable to use statically imported const string in annotation
- Compile Error when private and public functions use same name in compile static mode
- Extraneous bytecode generated after calls to void DGM methods
- interface extends interface and uses static field in default method
- source offset of inner class declaration with annotation
- Record classes with a map parameter cause errors with duplicate map constructors
- STC: trait extends trait and tries to use static field
- STC: method call with class literals
- Incremental compilation in groovyc Ant task is not working properly
- GPathResult and attribute syntax within inner class
- Groovy 4_0_X branch fails
- Grails reproducible build
- Method reference using class name results in bogus error message
- Return statement throws a compile error inside a closure
- Static type checking fails with groovy 5.x
- SC: implicit-this call to static method of super class from another package
- [GINQ] `groupby` alias can not be found in `switch` expression of `orderby`
- Tuple#toArray doesn't honor expected contract for immutability
- Fails to compile due to forbidden access to `this` of interface
- Inherting the same Generic Interface at different levels in an inheritance hierachy causes error
- Templates not recognized for inner classes in certain scenarios
- Generics Compilation Bug
- [GINQ] Failed to recognize sub-query in where clause
- Unable to access inherited private fields from a closure within an inherited method
- groovyc should enforce correct usage of "continue"
- ClassFormatError when using the name including "-" sign
- null.class inconsistent with null.getClass() [NullObject]
- variable declared in try block is in scope in finally block
- Mocking a method with byte[] parameter type throws a ClassCastException: ArrayList cannot be cast to Number
- Map access is given higher precedence when trying to access fields/properties in classes which implement java.util.Map or extend java.util.HashMap or java.util.Properties *
- 'this' uses in a superclass is treated as subclass, preventing acces to private members
- HashMap subclass property access inconsistent
- Multiple assignment from Iterator skips every other element
- CLONE - dash in script filename
- Type inference breaks in longer transitive generic structures
- Return type of "inject" is not inferred properly
- Confusing treatment of m['foo'], m.get('foo'), m.foo, m.getFoo() for Maps *
- Calling a Java vararg method from Groovy with a null argument cast to the vararg type behaves differently than in Java
- super class private members are preferred over public members of the current class with lower priority
- Cannot call closure like a method in type checked mode
- MissingPropertyException when private static property is used inside a nested closure and called from a child class
- The extension mechanism do not work when a method named "X" is a added to class having a private method named "X"
- flow typing detects unexpected error at if-else flow
- delegate is NullObject instance for closure metamethods invoked on null
- error message glitch for LUB
- Incorrect order of calling super.method when depth more than two and first class is generic
- Static compiler doesn't coerce GString for getAt() call
- Calling "each" on an untyped model variable with two arguments causes doCall error
- Compilation not thread safe if Grape / Ivy is used in Groovy scripts
- Compilation errors using groovy trait and @CompileStatic and @Slf4j("LOG")
- CLONE - dash in script filename
- ClassNode tryFindPossibleMethod only defined for TupleExpression
- asType(null) called in @CompileStatic method returns a string 'null'
- @SelfType does not allow trait to be added dynamically
- setScriptBaseClass with Java base class breaks @Field initialization from Binding due to generated call to wrong constructor
- Cross-project @Log + static import issue
- When using Interface: BigDecimal cannot be cast to Double
- Class constant withouts .class in annotation value resolves as VariableExpression
- coerce GString to String when used as Map key
- Add @TupleConstructor(includeFields = true) to a class implements a trait which contains properties will cause NPE *
- Alias is ignored in constructor call *
- Field shadowing not considered in STC *
- STC: floating-point literals no longer accepted as args to method with double parameter
- Glitch with native lambda support when supplied with incorrect arity lambda
- The private keyword of an instance variable is causing a behavior change in a map class
- Spread operator type conversion error
- Calling super in an overridden method results in MissingMethodException when method indirectly inherited from trait
- Resource variable is accessible from finally block
- Inconsistency in extension method selection with @CompileStatic *
- MissingMethodException when a public method on a trait calls a static private one in a class hierarchy
- NullObject.metaClass
- BigDecimal to primitive conversion not working
- CompileStatic does not throw expected exception *
- JSR308 info incomplete in bytecode
- JSR308 annotation attributes not being validated
- error for enum constant with comma followed by method *
- org.codehaus.groovy.runtime.MetaClassHelper#getClassWithNullAndWrapper should return NullObject when accept null
- MissingMethodException when referencing a private enum method
- Groovy compiler inlines constants from precompiled classes when it's not safe to do so
- Cannot access protected field of Java superclass with --illegal-access=deny
- GroovyClassLoader.parseClass() StampedCommonCache.getAndPut() hang *
- Stub generator omits default interface methods
- STC: add error for write of private or package-private field of super class
- SAM type or functional interface referenced from a method is not visible from class loader
- MissingMethodException when a base class calls a private static method inside a closure

Improved:
- Add support for Optional to DefaultTypeTransformation.asCollection()
- CompilerConfiguration: improve target bytecode selection
- Extend streams support to spread and subscript
- STC: support spread arguments for varargs
- Add peek extension method for Optional, OptionalInt, OptionalLong and OptionalDouble
- Add extension method for coercing AtomicBoolean to boolean value
- Implement multiple-assignment (aka destructuring) via getAt(IntRange) or iterator()
- Provide a stream 'from' DGM method taking an IntRange
- Provide eachWithIndex for primitive arrays
- JEP 181: replace bridge methods with nest-based access control
- Add type checking for enum constant constructor call
- Meta-annotation retention policy and target *
- Potential additional DGM collectEntries variants
- Provide tail/init/head/first/last for primitive arrays
- Improve matching implicit arg closures to SAM types
- bytecode for in, !in, !() and ?:
- Provide min/max closure/comparator variants for primitive arrays
- Optimised variants for AGM#each
- Treat multiple underscores as placeholders in multi-assignment statements and closure/lambda parameters
- Add asBoolean for File and Path meaning the file or path exists
- Extend multi-assignment type checking to Range expressions
- List.minus() slow for Numbers *
- Produce and publish CycloneDX SBOM artifacts
- DGM every for primitive arrays
- Support lambda expression as named value
- ObjectArrayStaticTypesHelper does not handle negative indices
- STC: support coerced closure argument destructuring (for list and tuple)
- add a join() method for Iterable/List
- Support flattening of Optionals in flatten/flattenMany
- Groovy should no longer use MagicAccessorImpl from sun.reflect
- JsonOutput should handle Records like POGOs
- Improve STC error message for non-functional interface
- JSR308: improve support for explicit-this type annotations
- Support spread method arguments for iterable, iterator and stream
- Jakarta EE 9 compatibility for groovy-servlet
- IllegalArgumentException: null argument for primitive parameter
- indexOf extension method for arrays
- shouldFail return type
- ProxyGenerator creates a lot of AtomicReference instances regardless of "groovy.adapter.cache.default.size" setting
- Tweak cleanup DFA cache of parser
- Identity variants for DGM#countBy
- DGM#flatten flattens nested structures including arrays but not primitive arrays
- ASTMatcher should support matching a var-arg placeholder
- Avoid processing duplicated entries within META-INF
- Don't truncate argument types in MissingMethodException
- Generate `serialVersionUID` for each closure
- STC: error message for improper property initialization includes internal
- Optimise generated next() and previous() in enums
- STC: support for-each or for-in loop for implicitly-Iterable type
- Optimise bytecode for empty list expressions
- SQL enhancement to allow metadata access for execute
- Issue a warning when accessing static fields that are "shadowed" by get() methods
- property semantics of map-based types *
- MethodCallExpression getText() support for type arguments and dynamic selector
- property semantics of map-based types (pt.2) *
- Make Console.prefs public accessible
- Support method references/method pointers in annotations
- Support multiple Requires/Ensures/Invariant annotations in groovy-contracts
- Enable GroovyClassLoader to be ParallelCapable
- Add support for join and group by in ginq
- java.time.* should be imported automatically *
- Remove deprecated collections
- Sql should accept wildcard parameters
- Propagate parameters flag from compiler configuration to javac
- Add withIndex/indexed methods for ArrayGroovyMethods
- Explore pruning MANIFEST attributes
- Additional DGM lazy iterator methods
- Make DGM#chop(Iterator, int...) lazy *
- remove support for expression list in for-each statement
- Add DGM#toTuple(Map.Entry)
- Add returnEarly boolean variant for DGM#chop *
- Lazy findAll, collect, collectMany
- Replace buildscan-recipes with simplified custom value generation
- GC pause by Metadata GC Threshold for weeks then turned to Full GC
- Change return type of DGM#findIndexValues(Iterator) methods *
- Groovyc ant task is excessively verbose
- STC: assign range to primitive array
- Groovydoc fails to produce documentation for some files with higher Java language level code
- SC: class method reference
- Add an explicit mention of selected license for JavaParser for BIN/SDK.
- Java stubs use deprecated constant constructors in some cases
- The constructor produced by MapConstructor and the Immutable copyWith method should include NamedParam information
- Potential minor improvement to STC error message
- @Delegate generates random method orders
- Slightly expanded error messages
- Missing ClosureParams for NioExtensions#eachFile(Path, Closure)
- Add a Stream#size extension method that is an alias for Stream#count
- missed specific error message in extension module loading
- Static type checker should not register errors for ellipsis closure parameter annotated with @DelegatesTo
- "Possible solutions" message is confusing because it doesn't reflect whether a property is read-only or write-only
- Null safety: delegate constructor selection using static param types
- Cannot enable static type checking on a method where static compilation has been disabled
- Add primitive array min() and max()
- Unexpected behaviour of in operator on an Iterable
- Confusing error message when trying to access a property which is actually a method
- Update Groovysh to JLine3
- Generate bytecode for interface with default, private and static methods
- Support instanceof-like flow typing for class literal switch case
- Support !instanceof flow typing for else case
- Java compatibility: support multi-dimensional array initializers
- Array initialization from list literal without "as" should be supported under static compilation for multi-dimension arrays
- Consider additional target bytecode checks and/or simplification in some areas
- fix trait private method consistency
- GroovyDoc: List inherited properties

New Feature:
- Consider enhancing for loop to provide access to loop index or iterator
- Add `extension` & `baseName` extension methods
- Provide an AST transform to rename operator methods
- Provide an ascii barchart method
- Add '|', '&', and '^' operators to Set and SortedSet
- groovyc missing features from the library compiler
- Support instanceof variable
- Logical implication operator revisited
- StringGroovyMethods should have a getCodePoints method
- Provide a custom type checker for format strings
- Provide left/right shift operators for BitSet
- Add zip and transposing extension methods
- float variants for min/max in ArrayGroovyMethods
- Provide sum variants in ArrayGroovyMethods which take a unary operator
- Provide an injectAll DGM method
- Add Lazy generators for iterators
- Create SGM#next/previous methods which act like next/previous but also takes an integer repeat count
- Add column, eachColumn to AGM
- Create partitionPoint extension method variants
- Create drain extension method for Queues
- Create DGM#sort(List) and AGM#sort(T[]) variants that take an IntRange
- Create AGM#putAt variants
- Create SGM#getLength methods for StringBuilder/StringBuffer
- Create DGM#subList(IntRange) method
- Improved named-capturing group support for Groovy matchers
 Better support for CheckedCollections

Question:
- DGM: getMetaPropertyValues and getProperties includes private entries

Sub-task:
- Support private interface methods
- Initial JEP 521/445 compatibility *
- JEP 445 compatibility additional functionality
- Support static interface methods
- Update Groovysh to JLine3: initial version
- Additional work on groovysh for rc-1
- Additional work on groovysh for next release
 Closure in base class unable to call private methods when invoked from derived class
 Private inheritance bug: Closure accessing private method
 Private field inaccessible in closure when using a subclass

Task:
- Mark main/run methods in scripts as @Generated
- Support JDK 22
- Remove experimental AGM @Incubating methods now that selection by parameter count is improved
- Support JDK 23
- Add JDK 25 constant
- Add JDK24 Constant

Wish:
- Remove $getLookup method generation (Groovy 4+) *
- JsonOutput Pretty Print always escapes characters