We are using a Gradle 8.3 docker container to run our sonar scans. We just upgraded from the sonarqube-gradle-plugin
version 3.1.1 to 4.2.1.3168. We were trying to upgrade to sonarqube-gradle-plugin
version 4.4.1.3373 but got an issue running the gradle sonar
command where it was unable to find our gradle installation. This happens for every version after 4.2.1.3168 for us. This causes our container to use gradle wrapper to try and download the “missing” gradle 8.3 installation but we run our tests specifically in an environment with no outside internet access which has not been an issue until now.
Logs:
[2024-04-09T21:23:28.314Z] > Task :src:mobile-android:sonarqube
[2024-04-09T21:23:28.314Z] Task 'sonarqube' is deprecated. Use 'sonar' instead.
[2024-04-09T21:23:36.438Z] The property 'sonar.login' is deprecated and will be removed in the future. Please use the 'sonar.token' property instead when passing a token.
[2024-04-09T21:23:38.346Z] File '/home/<redacted path>.kt' is ignored. It is not located in module basedir '/home/<redacted path>/libs'.
[2024-04-09T21:23:46.477Z]
[2024-04-09T21:23:46.477Z] Downloading https://services.gradle.org/distributions/gradle-8.3-bin.zip
[2024-04-09T21:23:46.477Z]
[2024-04-09T21:23:46.477Z]
[2024-04-09T21:23:46.477Z] > Task :src:mobile-android:sonarqube FAILED
[2024-04-09T21:23:46.477Z]
[2024-04-09T21:23:46.477Z] FAILURE: Build failed with an exception.
[2024-04-09T21:23:46.477Z]
[2024-04-09T21:23:46.477Z] * What went wrong:
[2024-04-09T21:23:46.477Z] Execution failed for task ':src:mobile-android:sonarqube'.
[2024-04-09T21:23:46.477Z] > Could not install Gradle distribution from 'https://services.gradle.org/distributions/gradle-8.3-bin.zip'.