Sonarqube-gradle-plugin fails when used with IBM JDK

Using the latest version of sonarqube-gradle-pluign it fails to connect to a sonarqube instance when using HTTPS if gradle is using the IBM JDK.

This was a known issue with the okhttp library used by sonar-scanner-gradle:

It has been fixed since version 3.7.0 of okhttp:

The latest sonarqube-gradle-plugin release (2.6.2) uses the sonar-scanner-api

Which, looking at it’s parent pom (sonar-scanner-api-parent), uses okhttp 3.6.0:

However, the latest version of the sonar-scanner-api uses okhttp 3.11.0:

So upgrading the sonarqube-gradle-plugin to the latest scanner-api would resolve the issue (even updating it to the previous scanner-api version - - would suffice as it uses okhttp 3.8.1).

The obvious workaround for this is to not use the IBM JDK, but not really an option in my case.


sonar-scanner-gradle was already updated to use the latest version of the sonar-scanner-api v2.11, but it wasn’t released yet:

It should be out soon.
If you guys need it now, you can use this artifact:

You can even add as a maven repository and get the plugin from there using this unreleased build number.