0

I am trying to add sonarqube to my project and I followed the steps and added those lines to my build.gradle file

plugins {
  id "org.sonarqube" version "3.3"
}

sonarqube {
  properties {
    property "sonar.projectKey", "myproject"
    property "sonar.organization", "myusername"
    property "sonar.host.url", "https://sonarcloud.io"
  }
}

However, I get the following error:

Task 'sonarqube' not found in root project  'myproject'

I am using Gradle 6.9

Frederic
  • 2,015
  • 4
  • 20
  • 37
  • Try the fixes here:https://github.com/emAmazed/redlamp/issues/31#:~:text=Issue%3A%20Task%20%27sonarqube%27%20not%20found%20in%20root%20project.,that%20you%20should%20use%20to%20run%20this%20locally.. – Alias Cartellano Sep 24 '21 at 15:43

1 Answers1

0

The solution was to specify the location of my settings.gradle file as it is not located in the same folder than my build.gradle file.

--settings-file=
Frederic
  • 2,015
  • 4
  • 20
  • 37