5

I am setting up a new multi-module gradle project to be built in jenkins and trying to get sonarqube analysing it but I have struck several incompatibility issues which I haven't been able to resolve.

I am looking at using

  1. the sonarqube plugin because our existing projects get a warning about the deprecation of sonar-runner: The 'sonar-runner' plugin has been deprecated and is scheduled to be removed in Gradle 3.0. please use the official plugin from SonarQube (the docs).
  2. gradle 3
  3. this simple example from sonarqube https://github.com/SonarSource/sonar-examples/blob/master/projects/languages/java/gradle/java-gradle-simple/build.gradle

If I use gradle 3 I get this error: org.gradle.internal.jvm.Jvm.getRuntimeJar()Ljava/io/File;

If I use gradle 2.14 I get this error: Caused by: java.io.IOException: Incompatible version 1007 This error in the past has been caused by an incompatibility between the jacoco and sonarqube plugins see JaCoCo SonarQube incompatible version 1007.

Which versions should I use?

Community
  • 1
  • 1
stephen newman
  • 533
  • 4
  • 17

2 Answers2

2

FYI the release the SonarQube Scanner for Gradle 2.1 should happen very quickly and this version includes the support of Gradle 3.X. See https://jira.sonarsource.com/browse/SONARGRADL-16 which is already fixed.

0

You are not alone. I get the same issues as well. This works with gradle 2.12.

plugins {
    id 'jacoco'
    id 'java'
    id "org.sonarqube" version "2.0.1"
}
trevorism
  • 411
  • 2
  • 7
  • I have tried with gradle 2.12 but still get the error Caused by: java.io.IOException: Incompatible version 1007. .... $ ./gradlew -version ------------------------------------------------------------ Gradle 2.12 – stephen newman Aug 26 '16 at 09:34