Groovy
Groovy Goodness: Multiple Assignments
Did you wish to return two values from a method? Do you often work with coordinates? Would you like to return latitude and longitude from a method instead of wrapping them in an object? In Groovy you can do it with multiple assigments. @mrhaki shows you how.
Groovy's .with() and multiple assignment
If you use Groovy multiple assignment you may hit the next limitation. Only simple variables may be the target of multiple assignment expressions. Class fields cannot be used with multiple assignments.
Don't dispare, @IgorShults shows how to overcome this problem with the with operator.
Grails
Developing Grails 3 Applications With IntelliJ IDEA
Another quickcast by @jeffscottbrown. Learn:
- How to open a project with IntelliJ.
- How to run it and turn off bytecode verification to get reloading working.
- How to debug it. Attach a remote debugger.
- How to test it. Force intellij idea to run grails tests in the test environment
[French] How to integrate Chart.js with Grails 3
Do you want to display Graphs in a Grails 3 app? @bgoetzmann shows three ways to produce a JSON payload which can be used to display graphs with Chart.js. Really powerful how Grails 3 JSON views and Chart.js play together.
Don't speak french? Don't worry. I've translated the post into English.
Gradle
Introducing Composite Builds
Composite builds are a way to join multiple independent Gradle builds and build them together.
This looks really promising. It will encourage to create plugins and modules. Thus, less coupled applications. The Groovy ecosystem will leverage it for sure. Many of the projects ( Grails, Ratpack, Griffon ) can use Gradle as their build system and use plugins or modules.
Moreover, IntelliJ IDEA already supports Gradle Composite builds.
Asciidoctor Gradle Examples
If you are creating documentation with Asciidoctor, you will find the collection of examples on how to use Gradle and Asciidoctor to create html5, pdf, epub, deck.js, and reveal.js outputs really useful. Courtesy of @lspacewalker and @rob_winch.
At work I generate either html5 and pdf but I am curious to test the epub output.
Comment
G3 Summit is around the corner. Gr8conf india, GR8Conf EU and Greach already confirmed. The conference scene looks good but most importantly different pieces of the ecosystem look great. Projects as Grails, Ratpack, Geb keep releasing versions and improvements. I believe this last quarter of the year looks bright for Groovy.
Sorry for skipping last week issue. I intend to keep the weekly pace but sometimes it is tough.😞
This week is a mix of Groovy, Grails and Gradle tips. Enjoy!
Sergio del Amo