Merge pull request #949 from bclozel/sonarplugin
* pr/949: Use the official SonarQube Gradle plugin
This commit is contained in:
commit
ccbfd44862
20
build.gradle
20
build.gradle
|
|
@ -10,6 +10,10 @@ buildscript {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id "org.sonarqube" version "1.1"
|
||||||
|
}
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
linkHomepage = 'https://projects.spring.io/spring-framework'
|
linkHomepage = 'https://projects.spring.io/spring-framework'
|
||||||
linkCi = 'https://build.spring.io/browse/SPR'
|
linkCi = 'https://build.spring.io/browse/SPR'
|
||||||
|
|
@ -218,11 +222,11 @@ configure(subprojects - project(":spring-build-src")) { subproject ->
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
jacoco("org.jacoco:org.jacoco.agent:0.7.1.201405082137:runtime")
|
jacoco("org.jacoco:org.jacoco.agent:0.7.5.201505241946:runtime")
|
||||||
}
|
}
|
||||||
|
|
||||||
gradle.taskGraph.whenReady {taskGraph ->
|
gradle.taskGraph.whenReady {taskGraph ->
|
||||||
if (taskGraph.hasTask(':sonarRunner')) {
|
if (taskGraph.hasTask(':sonarqube')) {
|
||||||
test.jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=org.springframework.*"
|
test.jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=org.springframework.*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1140,10 +1144,8 @@ project("spring-framework-bom") {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'sonar-runner'
|
sonarqube {
|
||||||
|
properties {
|
||||||
sonarRunner {
|
|
||||||
sonarProperties {
|
|
||||||
property "sonar.projectName", "Spring Framework"
|
property "sonar.projectName", "Spring Framework"
|
||||||
property "sonar.profile", "Spring Framework"
|
property "sonar.profile", "Spring Framework"
|
||||||
property "sonar.jacoco.reportPath", "${buildDir.name}/jacoco.exec"
|
property "sonar.jacoco.reportPath", "${buildDir.name}/jacoco.exec"
|
||||||
|
|
@ -1399,14 +1401,14 @@ configure(rootProject) {
|
||||||
}
|
}
|
||||||
|
|
||||||
configure([project(':spring-build-src'), project(':spring-framework-bom')]) {
|
configure([project(':spring-build-src'), project(':spring-framework-bom')]) {
|
||||||
sonarRunner {
|
sonarqube {
|
||||||
skipProject = true
|
skipProject = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
configure(project(':spring-core')) {
|
configure(project(':spring-core')) {
|
||||||
sonarRunner {
|
sonarqube {
|
||||||
sonarProperties {
|
properties {
|
||||||
property "sonar.exclusions",
|
property "sonar.exclusions",
|
||||||
"src/main/java/org/springframework/cglib/**/*,src/main/java/org/springframework/asm/**/*"
|
"src/main/java/org/springframework/cglib/**/*,src/main/java/org/springframework/asm/**/*"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue