mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 00:38:21 +00:00
Use travis built-in SonarCloud support
This commit is contained in:
+7
-1
@@ -1,10 +1,16 @@
|
||||
language: java
|
||||
jdk:
|
||||
- oraclejdk8
|
||||
|
||||
addons:
|
||||
sonarcloud:
|
||||
organization: "github-apollo-rsps"
|
||||
|
||||
after_success:
|
||||
- ./gradlew jacocoTestReport
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
- ./gradlew -Dsonar.organization=github-apollo-rsps -Dsonar.host.url=https://sonarcloud.io -Dsonar.login="$SONARCLOUD_TOKEN" sonarqube
|
||||
- git fetch --unshallow
|
||||
- ./gradlew -Dsonar.host.url=https://sonarcloud.io -Dsonar.login="$SONAR_TOKEN" sonarqube
|
||||
before_cache:
|
||||
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
|
||||
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
|
||||
|
||||
+1
-1
@@ -17,5 +17,5 @@ allprojects {
|
||||
}
|
||||
|
||||
apply from: 'gradle/properties.gradle'
|
||||
apply from: 'gradle/jacoco.gradle'
|
||||
apply from: 'gradle/quality-gate.gradle'
|
||||
apply from: 'gradle/wrapper.gradle'
|
||||
@@ -5,7 +5,6 @@ def testedProjects() {
|
||||
}
|
||||
|
||||
gradle.projectsEvaluated {
|
||||
|
||||
configure(testedProjects()) {
|
||||
apply plugin: 'jacoco'
|
||||
|
||||
@@ -19,11 +18,17 @@ gradle.projectsEvaluated {
|
||||
}
|
||||
|
||||
test {
|
||||
reports {
|
||||
junitXml.enabled = true
|
||||
html.enabled = false
|
||||
}
|
||||
|
||||
jacoco {
|
||||
append = false
|
||||
destinationFile = file("$buildDir/jacoco/jacocoTest.exec")
|
||||
classDumpDir = file("$buildDir/jacoco/classpathdumps")
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +40,7 @@ gradle.projectsEvaluated {
|
||||
|
||||
reports {
|
||||
xml.enabled = true
|
||||
html.enabled = true
|
||||
html.enabled = false
|
||||
}
|
||||
|
||||
testedProjects().each { subproject ->
|
||||
@@ -54,5 +59,14 @@ gradle.projectsEvaluated {
|
||||
executionData = execData
|
||||
}
|
||||
|
||||
sonarqube {
|
||||
properties {
|
||||
property "sonar.organization", "github-apollo-rsps"
|
||||
property "sonar.projectKey", "apollo:org.apollo"
|
||||
property "sonar.projectName", "Apollo RSPS"
|
||||
property "sonar.kotlin.file.suffixes", ".kt,.kts"
|
||||
}
|
||||
}
|
||||
|
||||
project.tasks["sonarqube"].dependsOn(jacocoTestReport)
|
||||
}
|
||||
Reference in New Issue
Block a user