Summary

We learned in this chapter that it is easy to use code analysis tools in a Gradle project. We can use Checkstyle, PMD, JDepend, and FindBugs for Java projects. For Groovy projects, we can use CodeNarc. All the plugins of these tools add new tasks to our project, for each source set to do the analysis. Each of these tasks is a dependency task for the check task. So when we apply the plugin in a normal build, the code analysis will take place. Also, we learned that the usage and syntax are mostly identical for each plugin.

With the Sonar plugin, we can send the analysis data of our project to a Sonar server. This task is a standalone task that is not part of a normal build process.

In the next chapter, we will take a look at how we can write our own custom task and plugin. We'll learn how we can make it reusable in other Gradle builds.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.29.71