annotate metrics40.gradle @ 289:093ff657fd79

SSED-1600: Changed Gradle version check from Gradle 7.0 to Gradle 7.2
author Kyle Miller <kyle.miller@mcoecn.org>
date Tue, 19 Jul 2022 16:57:55 +0100
parents 2f6d25a71778
children de8c350c511a
rev   line source
253
46064f36ae31 remove old jaranalyzer and replace with stub to avoid breaking projects
smith@nwoca.org
parents: 251
diff changeset
1 import org.gradle.api.Plugin
46064f36ae31 remove old jaranalyzer and replace with stub to avoid breaking projects
smith@nwoca.org
parents: 251
diff changeset
2 import org.gradle.api.Project
46064f36ae31 remove old jaranalyzer and replace with stub to avoid breaking projects
smith@nwoca.org
parents: 251
diff changeset
3 import org.gradle.api.tasks.bundling.Jar
46064f36ae31 remove old jaranalyzer and replace with stub to avoid breaking projects
smith@nwoca.org
parents: 251
diff changeset
4
46064f36ae31 remove old jaranalyzer and replace with stub to avoid breaking projects
smith@nwoca.org
parents: 251
diff changeset
5 import org.gradle.api.DefaultTask
46064f36ae31 remove old jaranalyzer and replace with stub to avoid breaking projects
smith@nwoca.org
parents: 251
diff changeset
6 import org.gradle.api.tasks.OutputDirectory
46064f36ae31 remove old jaranalyzer and replace with stub to avoid breaking projects
smith@nwoca.org
parents: 251
diff changeset
7 import org.gradle.api.tasks.OutputFile
46064f36ae31 remove old jaranalyzer and replace with stub to avoid breaking projects
smith@nwoca.org
parents: 251
diff changeset
8 import org.gradle.api.tasks.TaskAction
46064f36ae31 remove old jaranalyzer and replace with stub to avoid breaking projects
smith@nwoca.org
parents: 251
diff changeset
9
46064f36ae31 remove old jaranalyzer and replace with stub to avoid breaking projects
smith@nwoca.org
parents: 251
diff changeset
10 import java.util.jar.JarFile
46064f36ae31 remove old jaranalyzer and replace with stub to avoid breaking projects
smith@nwoca.org
parents: 251
diff changeset
11
232
47535c8358ce DEP-13: adjust init script to handle both 2.+ and 3.1. Disable sonar for 3.1+
smith@nwoca.org
parents: 214
diff changeset
12 final GradleVersion gradleCurrent = GradleVersion.current()
47535c8358ce DEP-13: adjust init script to handle both 2.+ and 3.1. Disable sonar for 3.1+
smith@nwoca.org
parents: 214
diff changeset
13 final GradleVersion gradleV31 = GradleVersion.version('3.1')
47535c8358ce DEP-13: adjust init script to handle both 2.+ and 3.1. Disable sonar for 3.1+
smith@nwoca.org
parents: 214
diff changeset
14
85
f36eeb411845 add sonar publishing
smith@nwoca.org
parents:
diff changeset
15
f36eeb411845 add sonar publishing
smith@nwoca.org
parents:
diff changeset
16 buildscript {
248
c8c8766492c5 USASR-2891: Update metrics.gradle to support update to Gradle v4.2.1 and Sonar v2.5
Christopher Springer <springer@nwoca.org>
parents: 239
diff changeset
17 final GradleVersion gradleV421 = GradleVersion.version('4.2.1')
c8c8766492c5 USASR-2891: Update metrics.gradle to support update to Gradle v4.2.1 and Sonar v2.5
Christopher Springer <springer@nwoca.org>
parents: 239
diff changeset
18
128
c93df17513f1 CM-133: add jacoco for standard coverage reports. Add sonar properties for SCM and bamboo plan
smith@nwoca.org
parents: 126
diff changeset
19 repositories {
278
2f6d25a71778 DEP-19: update maven repo urls
Marc Davis <davis@ssdt-ohio.org>
parents: 263
diff changeset
20 maven { url 'https://docker.ssdt.io/artifactory/gradle-plugins' }
2f6d25a71778 DEP-19: update maven repo urls
Marc Davis <davis@ssdt-ohio.org>
parents: 263
diff changeset
21 maven { url 'https://docker.ssdt.io/artifactory/ssdt-repo' }
134
afafe40ae5a9 add jaranalyzer plugin
smith@nwoca.org
parents: 133
diff changeset
22 }
afafe40ae5a9 add jaranalyzer plugin
smith@nwoca.org
parents: 133
diff changeset
23 dependencies {
263
0a6a5a7470c4 add scripts for gradle 4+ to use new gradle dependency locking and cleanup accumulated clutter
smith@nwoca.org
parents: 253
diff changeset
24 classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6"
238
d7f0ae9e28af DEP-12: restrict analysis to default, release and hotfox branches
smith@nwoca.org
parents: 237
diff changeset
25 }
85
f36eeb411845 add sonar publishing
smith@nwoca.org
parents:
diff changeset
26 }
126
b2532280341e CM-133: switch to sonar-runner
smith@nwoca.org
parents: 119
diff changeset
27
263
0a6a5a7470c4 add scripts for gradle 4+ to use new gradle dependency locking and cleanup accumulated clutter
smith@nwoca.org
parents: 253
diff changeset
28 apply plugin: org.sonarqube.gradle.SonarQubePlugin
253
46064f36ae31 remove old jaranalyzer and replace with stub to avoid breaking projects
smith@nwoca.org
parents: 251
diff changeset
29
263
0a6a5a7470c4 add scripts for gradle 4+ to use new gradle dependency locking and cleanup accumulated clutter
smith@nwoca.org
parents: 253
diff changeset
30 sonarqube {
0a6a5a7470c4 add scripts for gradle 4+ to use new gradle dependency locking and cleanup accumulated clutter
smith@nwoca.org
parents: 253
diff changeset
31 properties {
0a6a5a7470c4 add scripts for gradle 4+ to use new gradle dependency locking and cleanup accumulated clutter
smith@nwoca.org
parents: 253
diff changeset
32 property "sonar.host.url", "http://sonar.ssdt.io:9000"
0a6a5a7470c4 add scripts for gradle 4+ to use new gradle dependency locking and cleanup accumulated clutter
smith@nwoca.org
parents: 253
diff changeset
33 property "sonar.login", System.getenv('bamboo_SONAR_TOKEN')
0a6a5a7470c4 add scripts for gradle 4+ to use new gradle dependency locking and cleanup accumulated clutter
smith@nwoca.org
parents: 253
diff changeset
34 property "sonar.exclusions","**/ProjectVersion*"
253
46064f36ae31 remove old jaranalyzer and replace with stub to avoid breaking projects
smith@nwoca.org
parents: 251
diff changeset
35 }
46064f36ae31 remove old jaranalyzer and replace with stub to avoid breaking projects
smith@nwoca.org
parents: 251
diff changeset
36 }
46064f36ae31 remove old jaranalyzer and replace with stub to avoid breaking projects
smith@nwoca.org
parents: 251
diff changeset
37
263
0a6a5a7470c4 add scripts for gradle 4+ to use new gradle dependency locking and cleanup accumulated clutter
smith@nwoca.org
parents: 253
diff changeset
38 allprojects {
0a6a5a7470c4 add scripts for gradle 4+ to use new gradle dependency locking and cleanup accumulated clutter
smith@nwoca.org
parents: 253
diff changeset
39 afterEvaluate { project ->
0a6a5a7470c4 add scripts for gradle 4+ to use new gradle dependency locking and cleanup accumulated clutter
smith@nwoca.org
parents: 253
diff changeset
40 project.getTasksByName('sonarqube',false).each {
0a6a5a7470c4 add scripts for gradle 4+ to use new gradle dependency locking and cleanup accumulated clutter
smith@nwoca.org
parents: 253
diff changeset
41 it.enabled = gradle.branchStream in ['release']
0a6a5a7470c4 add scripts for gradle 4+ to use new gradle dependency locking and cleanup accumulated clutter
smith@nwoca.org
parents: 253
diff changeset
42 }
0a6a5a7470c4 add scripts for gradle 4+ to use new gradle dependency locking and cleanup accumulated clutter
smith@nwoca.org
parents: 253
diff changeset
43 }
253
46064f36ae31 remove old jaranalyzer and replace with stub to avoid breaking projects
smith@nwoca.org
parents: 251
diff changeset
44 }