Gradle build task now also supports PMD analysis

Last month, we enabled support for PMD analysis in the Maven build task (see The Maven build task now supports PMD analysis out of the box). This is now the turn of Gradle.

PMD Analysis with Gradle

You can now request a PMD analysis in the Gradle build task using the new “Run PMD Analysis” checkbox which instructs Gradle to perform PMD static analysis


The build summary then reports the number of issues found by PMD. Detailed issue logs are available under the build artifact tab of the build summary like for Maven.

The PMD analysis is performed using the default set of rules, which at the time of writing are the basic rules and the bracing rules. You are encouraged to specify other rules by modifying their gradle scripts.

If you have already configured PMD, we won’t touch your settings, but we will try to find the results and create a report.


We’d like to hear from you. Please raise issues and suggestions on the issues tab of the VSTS task repository in GitHub: