Question: Is it possible to add sonarlint to gradle task? If yes, how? My only idea till now is to download it manually in gradle script, but I suppose that there is a better solution.

Answer: 
I had similar requirement. I don't have SonarQube running nor SonarCloud solution, still I want to run SonarLint as part of the build process. Found the following gradle plugin

```
plugins {
  id "name.remal.sonarlint" version "1.4.1"
}

```

With it you can run SonarLint analysis whenever you build your gradle project with **sonarlintMain** task. You can find example of the usage on [my blog](https://rivancic.com/posts/gradle-jacoco-sonarlint/)

And here is detailed [pluign page](https://remal.gitlab.io/gradle-plugins/plugins/name.remal.sonarlint/)
Yes there is. I assume that you have sonarlint installed on your system already. Here is the Gradle task that I am using to run it as a part of a Gradle Task:

```
task runSonarLint(type: Exec){
  dependsOn "assemble"
  workingDir 'src/main/java'
  executable "sonarlint.bat"
  args "-u"
}

```

Note: I am using some custom profiles from my SonarQube server and that is why I use the "-u" option.