# HG changeset patch # User Kyle Miller # Date 1658324291 -3600 # Node ID 36b6c48ee6c756b957273aed0a10ffbeeaabf3cc # Parent 093ff657fd7991d968b46dc15dbf6cfa63a75f03 SSED-1600: Created metrics70.gradle with an updated sonarqube-gradle-plugin (from 2.6 to 3.3), modified init70.gradle to use metrics70.gradle diff -r 093ff657fd79 -r 36b6c48ee6c7 init70.gradle --- a/init70.gradle Tue Jul 19 16:57:55 2022 +0100 +++ b/init70.gradle Wed Jul 20 14:38:11 2022 +0100 @@ -145,7 +145,7 @@ } if (!rootProject.hasProperty('disableMetrics')) { - apply from: resources.text.fromInsecureUri("${gradle.ssdtDevelkitLocation}/metrics50.gradle") + apply from: resources.text.fromInsecureUri("${gradle.ssdtDevelkitLocation}/metrics70.gradle") } rootProject.afterEvaluate { r -> diff -r 093ff657fd79 -r 36b6c48ee6c7 metrics70.gradle --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/metrics70.gradle Wed Jul 20 14:38:11 2022 +0100 @@ -0,0 +1,28 @@ + +buildscript { + repositories { + maven { url 'https://docker.ssdt.io/artifactory/gradle-plugins' } + maven { url 'https://docker.ssdt.io/artifactory/ssdt-repo' } + } + dependencies { + classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.3" + } +} + +apply plugin: org.sonarqube.gradle.SonarQubePlugin + +sonarqube { + properties { + property "sonar.host.url", "http://sonar.ssdt.io:9000" + property "sonar.login", System.getenv('bamboo_SONAR_TOKEN') + property "sonar.exclusions","**/ProjectVersion*" + } +} + +allprojects { + afterEvaluate { project -> + project.getTasksByName('sonarqube',false).each { + it.enabled = gradle.branchStream in ['release'] + } + } +}