You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ce...@apache.org on 2017/03/10 20:13:46 UTC
svn commit: r1786430 - in /poi/trunk: build.gradle jenkins/create_jobs.groovy
Author: centic
Date: Fri Mar 10 20:13:46 2017
New Revision: 1786430
URL: http://svn.apache.org/viewvc?rev=1786430&view=rev
Log:
Allow to enable Sonar as part of the Gradle build and add Jenkins DSL job to test it
Modified:
poi/trunk/build.gradle
poi/trunk/jenkins/create_jobs.groovy
Modified: poi/trunk/build.gradle
URL: http://svn.apache.org/viewvc/poi/trunk/build.gradle?rev=1786430&r1=1786429&r2=1786430&view=diff
==============================================================================
--- poi/trunk/build.gradle (original)
+++ poi/trunk/build.gradle Fri Mar 10 20:13:46 2017
@@ -21,14 +21,15 @@ buildscript {
dependencies {
classpath 'me.champeau.gradle:japicmp-gradle-plugin:0.1.2'
+ classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.2.1"
}
}
-/* We cannot add this here as the Sonar-plugin requires Java 8, but
- * we want to at least keep Java 7 compatibility for building POI via Gradle for now
-plugins {
- id "org.sonarqube" version "2.2.1"
-}*/
+// Only add the plugin for Sonar if enabled as it requires Java 8
+if (project.hasProperty('enableSonar')) {
+ println 'Enabling Sonar support'
+ apply plugin: "org.sonarqube"
+}
// For help converting an Ant build to a Gradle build, see
// https://docs.gradle.org/current/userguide/ant.html
Modified: poi/trunk/jenkins/create_jobs.groovy
URL: http://svn.apache.org/viewvc/poi/trunk/jenkins/create_jobs.groovy?rev=1786430&r1=1786429&r2=1786430&view=diff
==============================================================================
--- poi/trunk/jenkins/create_jobs.groovy (original)
+++ poi/trunk/jenkins/create_jobs.groovy Fri Mar 10 20:13:46 2017
@@ -63,6 +63,8 @@ def poijobs = [
],
[ name: 'POI-DSL-SonarQube', jdk: '1.8', trigger: 'H 9 * * *', maven: true, sonar: true
],
+ [ name: 'POI-DSL-SonarQube-Gradle', jdk: '1.8', trigger: 'H 9 * * *', gradle: true, sonar: true, skipcigame: true
+ ],
]
def svnBase = 'https://svn.apache.org/repos/asf/poi/trunk'
@@ -240,6 +242,24 @@ for more details about the DSL.</b>
if (!poijob.skipcigame) {
configure { project ->
project / publishers << 'hudson.plugins.cigame.GamePublisher' {}
+ }
+ }
+ mailer(email, false, false)
+ }
+ } else if(poijob.sonar) {
+ steps {
+ shell(shellcmds)
+ gradle {
+ switches('-PenableSonar')
+ switches('-PsystemProp.sonar.host.url=$SONAR_HOST_URL')
+ tasks('sonarqube')
+ useWrapper(false)
+ }
+ }
+ publishers {
+ if (!poijob.skipcigame) {
+ configure { project ->
+ project / publishers << 'hudson.plugins.cigame.GamePublisher' {}
}
}
mailer(email, false, false)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org