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 2.9.0.887:
https://search.maven.org/artifact/org.sonarsource.scanner.gradle/sonarqube-gradle-plugin/2.6.2/pom
Which, looking at it’s parent pom (sonar-scanner-api-parent), uses okhttp 3.6.0:
https://search.maven.org/artifact/org.sonarsource.scanner.api/sonar-scanner-api-parent/2.9.0.887/pom
However, the latest version of the sonar-scanner-api uses okhttp 3.11.0:
https://search.maven.org/artifact/org.sonarsource.scanner.api/sonar-scanner-api-parent/2.11.0.1537/pom
So upgrading the sonarqube-gradle-plugin to the latest scanner-api would resolve the issue (even updating it to the previous scanner-api version - 2.10.0.1189 - 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.