{"id":17795,"date":"2016-06-15T12:18:22","date_gmt":"2016-06-15T05:18:22","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/?p=17795"},"modified":"2019-02-14T17:33:56","modified_gmt":"2019-02-15T01:33:56","slug":"the-gradle-build-task-now-supports-sonarqube-analysis","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/devops\/the-gradle-build-task-now-supports-sonarqube-analysis\/","title":{"rendered":"The Gradle build task now supports SonarQube analysis"},"content":{"rendered":"<h4>SonarQube analysis for Java<\/h4>\n<p>In October, we updated the Maven task to support SonarQube analysis (See <a href=\"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/2015\/10\/08\/the-maven-build-task-now-simplifies-sonarqube-analysis\/\">The Maven build task now simplifies SonarQube analysis<\/a>). This time, we are pleased to announce an updated Gradle task which makes it easy for Java developers using Gradle to trigger a SonarQube analysis in Visual Studio Team Services.<\/p>\n<h4>Using the Gradle task with SonarQube<\/h4>\n<p>Just as for Maven, we have added a Code Analysis section in which you can now check the \u201cRun SonarQube Analysis\u201d checkbox, which then shows more options.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/clip_image00214.jpg\"><img decoding=\"async\" style=\"padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px\" title=\"clip_image002\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2016\/06\/clip_image002_thumb12.jpg\" alt=\"clip_image002\" width=\"608\" height=\"557\" border=\"0\" \/><\/a><\/p>\n<p>You will need to provide:<\/p>\n<ul>\n<li>\n<p>The service endpoint describing your SonarQube server and credentials<\/p>\n<\/li>\n<li>\n<p>The project name, key and version (contrary to Maven, where these are mandatory properties in pom files, in Gradle these are not always present)<\/p>\n<\/li>\n<\/ul>\n<p>You can also further customize the analysis either by passing SonarQube settings via options or by chaining your Gradle config. For more information about SonarQube analysis using Gradle see <a href=\"http:\/\/docs.sonarqube.org\/display\/SCAN\/Analyzing+with+SonarQube+Scanner+for+Gradle\">http:\/\/docs.sonarqube.org\/display\/SCAN\/Analyzing+with+SonarQube+Scanner+for+Gradle<\/a><\/p>\n<h4>Limitations, Feedback and Troubleshooting<\/h4>\n<p>Currently this feature works only in Team Services with the Linux agent. It is not available on TFS 2015, but will be in the next major version of TFS.<\/p>\n<p>We\u2019d like to hear from you, Please Raise issues and suggestions on the issues tab of the VSTS task repository in GitHub: <a href=\"https:\/\/github.com\/microsoft\/vsts-tasks\/issues\">https:\/\/github.com\/microsoft\/vsts-tasks\/issues<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>SonarQube analysis for Java In October, we updated the Maven task to support SonarQube analysis (See The Maven build task now simplifies SonarQube analysis). This time, we are pleased to announce an updated Gradle task which makes it easy for Java developers using Gradle to trigger a SonarQube analysis in Visual Studio Team Services. Using [&hellip;]<\/p>\n","protected":false},"author":112,"featured_media":45953,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[253,229,1,249],"tags":[],"class_list":["post-17795","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure-devops-server","category-community","category-devops","category-open-source"],"acf":[],"blog_post_summary":"<p>SonarQube analysis for Java In October, we updated the Maven task to support SonarQube analysis (See The Maven build task now simplifies SonarQube analysis). This time, we are pleased to announce an updated Gradle task which makes it easy for Java developers using Gradle to trigger a SonarQube analysis in Visual Studio Team Services. Using [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/17795","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/users\/112"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/comments?post=17795"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/17795\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media\/45953"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media?parent=17795"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/categories?post=17795"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/tags?post=17795"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}