Java Reference
In-Depth Information
Lessons learned (Grapes and Gradle)
1. @Grab is helpful for Groovy scripts.
2. Gradle uses Groovy build files to configure your build but downloads the internet
like Maven.
3. Gradle does not have artifacts like Maven, but people are working on ways to cre-
ate standard builds for various goals.
4. In addition to the discussion in this chapter, every project in this topic includes a
Gradle build highlighting a variety of capabilities.
5.7. Summary
This chapter looked at build tools useful for both Groovy and Java projects. Ant is very
common but low level. Groovy provides both a raw groovy task and a groovyc com-
piler task, which can be useful in combined projects.
Maven is a higher-level tool, but it can be difficult to customize. In this chapter I presented
both the GMaven project as a way to add Groovy to Maven and the Groovy-Eclipse plugin
approach, which tends to be more robust for cross-compilation issues.
Groovy includes an @Grab annotation with its so-called Grapes capability, which can be
used to add dependencies directly to a Groovy script. It's powerful, but it's restricted to
Groovy builds.
Finally, I presented the Gradle build tool. This chapter included a basic discussion of
Gradle and mentioned several more advanced capabilities. Gradle is used throughout this
book to demonstrate interesting mechanisms in each chapter.
Search WWH ::




Custom Search