Skip to content

sarod/groovy-core

 
 

Repository files navigation

Groovy

groovy logo

Groovy is a powerful, optionally typed and dynamic language, with static-typing and static compilation capabilities, for the Java platform aimed at multiplying developers’ 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.

Downloading

Latest Groovy version is available on Bintray Bintray latest version

Binary distribution links are on the package page.

Maven, Gradle and Ivy dependency declaration snippets are available on specific files of a particular module.

Get automatic notifications about new "groovy" versions link=https://bintray.com/groovy/maven/groovy/view?source=watch

Building

Build is build status.

To build you will need:

To build everything using Gradle (the command below will download Gradle automatically, you do not need to download it first).

./gradlew clean dist

This will generate a distribution similar to the zip you can download on the Groovy download page.

To build everything and launch unit tests, use

./gradlew test

If you want to launch one unit test, use this. <TestClassName> is like groovy.GroovyMethodsTest.

./gradlew :test --tests <TestClassName>

To build from IntelliJ IDEA

./gradlew jarAll idea

Then open the generated project in IDEA.

To build from Eclipse

./gradlew jarAll eclipse

Then open the generated project and the generated subprojects in Eclipse. But be aware that Eclipse tends to be more limited in its ability to reproduce a Gradle build structure. The generated project files may contain a circular dependency which may or may not prevent Eclipse from using them. It depends on the Eclipse version, if this is an issue or not.

To build the documentation (Groovy Language Documentation)

./gradlew assembleAsciidoc

All code samples of the documentation guide are pulled from actual test cases. To run a single documentation test case, take for example src/spec/test/semantics/PowerAssertTest.groovy

./gradlew testSinglePowerAssertTest

(Note the omission of package name: class is semantics.PowerAssertTest but only PowerAssertTest is added to testSingle.)

InvokeDynamic support

The Groovy build supports the new Java 7 JVM instruction invokedynamic. If you want to build Groovy with invokedynamic, you can use the project property indy:

./gradlew -Pindy=true clean test

Please note that the following Gradle tasks generate both indy and non indy variants of the jars, so you don’t need to use the system property:

  • dist

  • install

  • uploadArchives

Continuous Integration Server

The official CI server runs here (login as user guest and leave the password blank) and is sponsored by JetBrains.

License

Groovy is licensed under the terms of the Apache License, Version 2.0

Packages

No packages published

Languages

  • Java 58.9%
  • Groovy 37.9%
  • GAP 1.2%
  • HTML 0.8%
  • CSS 0.7%
  • TeX 0.2%
  • Other 0.3%