Summary

In this chapter, we discussed how to work with Groovy and Scala sources in a Gradle project. We applied the either Groovy or Scala plugins to our project and saw that Gradle added the tasks to compile the source files to the project. We also discussed that we must add a dependency to the correct Groovy or Scala version of the dependency configuration added by the plugin. Both plugins will include the Java plugin as well.

We also discussed that the plugins also provide some new properties for source sets so that we can, for example, find all Groovy or Scala source files in a source set.

In the next chapter, we will take a look at how to add code quality tools to our Gradle builds.

Get Gradle Effective Implementations Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.