SonarKotlin plugin fails downloading gradle

We have updated our SonarQube installation to 10.2.1 (build 78527).
After the update we see the following exception:

Task :sonar FAILED
Execution failed for task ‘:sonar’. org.gradle.tooling.BuildException: Could not execute build using connection to Gradle distribution ‘https://services.gradle.org/distributions/gradle-7.5.1-bin.zip’.

We having a gradle kotlin based project and a default SonarQube Community Edition. We are using the latest version (4.4.1.3373) of the sonarqube-gradle-plugin. We also using a custom Gradle distribution where we define repositories,

When we execute the sonar Gradle task on our project, we see the exception. With our previous SonarQube version (9.9) we did not have this issue.

We tried setting the sonar.kotlin.file.suffixes to not .kt and .kts, which fixes the error, but we loose scan results of our Kotlin files.

Any idea how we can fix this problem?

gradle_build_log.txt (127.5 KB)

Hello @pschwarzer-tt,

Thanks for the report. This is happening when we try to analyze your build.gradle.kts and settings.gradle.kts files. Could you please exclude them from the analysis and check if everything works again?

This was fine in 9.9 because we recently introduced the analysis of your build scripts.

Meanwhile, we will try to investigate and fix the issue. You can track it here: [SONARKT-370] - Jira

Best,
Margarita

Hi, i have added **/build.gradle.kts and **/settings.gradle.kts to sonar.exclusions, but still see the issue.

In the affected module, Kotlin files located in.

error.txt (68.4 KB)

Getting same issue, @pschwarzer-tt were you able to fix it?

@fdolsky could you please clarify which version of SQ you’re using?

Best,
Margarita

Latest one 10.3.

Thanks for your reply.

Yes, 10.3 was released before we delivered a fix (The fix should have been done in sonar-kotlin-plugin). So I think once 10.4 is out, your issue will be fixed, meanwhile using plugin for Gradle 4.2 could be your workaround.

Sorry for the inconvenience.

Best,
Margarita