diff --git a/Plan/build.gradle b/Plan/build.gradle index 1d029c646..9867d1952 100644 --- a/Plan/build.gradle +++ b/Plan/build.gradle @@ -1,5 +1,7 @@ plugins { id "java" + id "jacoco" + id "org.sonarqube" version "2.2" id "net.ltgt.apt" version "0.19" id "com.github.johnrengelman.shadow" version "4.0.2" } @@ -16,6 +18,7 @@ subprojects { apply plugin: "maven" apply plugin: "net.ltgt.apt" apply plugin: "com.github.johnrengelman.shadow" + apply plugin: "jacoco" sourceCompatibility = 1.8 targetCompatibility = 1.8 @@ -104,4 +107,11 @@ subprojects { artifacts { testArtifacts testJar } +} + +sonarqube { + properties { + property "sonar.projectName", "Java Gradle-based project analyzed on SonarCloud using Travis" + property "sonar.projectKey", "com.sonarqube.examples.java-gradle-travis-project" + } } \ No newline at end of file diff --git a/scripts/runTests.sh b/scripts/runTests.sh index ae011682a..39767003a 100644 --- a/scripts/runTests.sh +++ b/scripts/runTests.sh @@ -7,5 +7,5 @@ if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then fi if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then - mvn org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar + gradle sonarqube fi