comparison metrics40.gradle @ 263:0a6a5a7470c4

add scripts for gradle 4+ to use new gradle dependency locking and cleanup accumulated clutter
author smith@nwoca.org
date Tue, 13 Nov 2018 18:14:45 +0000
parents metrics.gradle@46064f36ae31
children 2f6d25a71778
comparison
equal deleted inserted replaced
262:e531b09c4659 263:0a6a5a7470c4
1 import org.gradle.api.Plugin
2 import org.gradle.api.Project
3 import org.gradle.api.tasks.bundling.Jar
4
5 import org.gradle.api.DefaultTask
6 import org.gradle.api.tasks.OutputDirectory
7 import org.gradle.api.tasks.OutputFile
8 import org.gradle.api.tasks.TaskAction
9
10 import java.util.jar.JarFile
11
12 final GradleVersion gradleCurrent = GradleVersion.current()
13 final GradleVersion gradleV31 = GradleVersion.version('3.1')
14
15
16 buildscript {
17 final GradleVersion gradleV421 = GradleVersion.version('4.2.1')
18
19 repositories {
20 maven { url 'http://repos.ssdt.nwoca.org/artifactory/gradle-plugins' }
21 maven { url 'http://repos.ssdt.nwoca.org/artifactory/repo' }
22 }
23 dependencies {
24 classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6"
25 }
26 }
27
28 apply plugin: org.sonarqube.gradle.SonarQubePlugin
29
30 sonarqube {
31 properties {
32 property "sonar.host.url", "http://sonar.ssdt.io:9000"
33 property "sonar.login", System.getenv('bamboo_SONAR_TOKEN')
34 property "sonar.exclusions","**/ProjectVersion*"
35 }
36 }
37
38 allprojects {
39 afterEvaluate { project ->
40 project.getTasksByName('sonarqube',false).each {
41 it.enabled = gradle.branchStream in ['release']
42 }
43 }
44 }