All Projects → SonarSource → sonar-scanner-gradle

SonarSource / sonar-scanner-gradle

Licence: LGPL-3.0 license
SonarQube Scanner for Gradle

Programming Languages

java
68154 projects - #9 most used programming language
groovy
2714 projects

Projects that are alternatives of or similar to sonar-scanner-gradle

gradle-versioneye-plugin
Plugin for Gradle to update your project's dependencies status on www.versioneye.com
Stars: ✭ 31 (-76.52%)
Mutual labels:  gradle-plugin
extra-java-module-info
A Gradle 6.4+ plugin to use legacy Java libraries as Java Modules in a modular Java project
Stars: ✭ 39 (-70.45%)
Mutual labels:  gradle-plugin
fabric-loom
Gradle build system plugin used to automate the setup of a minecraft mod development environment.
Stars: ✭ 150 (+13.64%)
Mutual labels:  gradle-plugin
secrets-gradle-plugin
A Gradle plugin for providing your secrets to your Android project.
Stars: ✭ 475 (+259.85%)
Mutual labels:  gradle-plugin
androidNativeBundle
a gradle plugin that support publish c/c++ headers to 'aar' and depend those 'aar'
Stars: ✭ 60 (-54.55%)
Mutual labels:  gradle-plugin
parcl
Gradle plugin for bundling your Java application for distribution on Windows, Mac and Linux
Stars: ✭ 52 (-60.61%)
Mutual labels:  gradle-plugin
metalava-gradle
A Gradle plugin for Metalava, AOSP's tool for API metadata extraction and compatibility tracking.
Stars: ✭ 29 (-78.03%)
Mutual labels:  gradle-plugin
gradle-jnlp-plugin
Gradle plugin to generate jnlp files, sign jars etc. for being able to start an application with Java Webstart
Stars: ✭ 19 (-85.61%)
Mutual labels:  gradle-plugin
sentry-android-gradle-plugin
Gradle plugin for Sentry Android. Upload proguard, debug files, and more.
Stars: ✭ 67 (-49.24%)
Mutual labels:  gradle-plugin
kosogor
Defaults and simplified Kotlins-DSL interfaces for Gradle
Stars: ✭ 18 (-86.36%)
Mutual labels:  gradle-plugin
gradle-git-versioning-plugin
This extension will set project version, based on current Git branch or tag.
Stars: ✭ 44 (-66.67%)
Mutual labels:  gradle-plugin
laboratory
Feature flags for multi-module Kotlin Android projects
Stars: ✭ 71 (-46.21%)
Mutual labels:  gradle-plugin
android-shortcut-gradle-plugin
Android Gradle plugin generates App Shortcuts shortcuts.xml for different flavors with different applicationId.
Stars: ✭ 20 (-84.85%)
Mutual labels:  gradle-plugin
android-buddy
Transform Android project classes with Byte Buddy at compile time
Stars: ✭ 42 (-68.18%)
Mutual labels:  gradle-plugin
kotlin-plugin-generated
A Kotlin compiler plugin that annotates Kotlin-generated methods for improved coverage reports
Stars: ✭ 33 (-75%)
Mutual labels:  gradle-plugin
Robfuscate
Obfuscate the int index of R.id/R.string/R.layout… in the classes.dex of Android project
Stars: ✭ 56 (-57.58%)
Mutual labels:  gradle-plugin
native-build-tools
Native-image plugins for various build tools
Stars: ✭ 168 (+27.27%)
Mutual labels:  gradle-plugin
kt2ts-gradle-plugin
Generate TypeScript from Kotlin (or any jvm language) by annotations
Stars: ✭ 15 (-88.64%)
Mutual labels:  gradle-plugin
groocss
GrooCSS - code CSS in Groovy
Stars: ✭ 24 (-81.82%)
Mutual labels:  gradle-plugin
FirebaseTestLab-Android
No description or website provided.
Stars: ✭ 50 (-62.12%)
Mutual labels:  gradle-plugin

SonarQube Scanner for Gradle

Build Status Quality Gate

User documentation

https://redirect.sonarsource.com/doc/gradle.html

Have Question or Feedback?

For support questions ("How do I?", "I got this error, why?", ...), please head to the SonarSource forum. There are chances that a question similar to yours has already been answered.

Be aware that this forum is a community, so the standard pleasantries ("Hi", "Thanks", ...) are expected. And if you don't get an answer to your thread, you should sit on your hands for at least three days before bumping it. Operators are not standing by. :-)

Contributing

If you would like to see a new feature, please create a new thread in the forum "Suggest new features".

Please be aware that we are not actively looking for feature contributions. The truth is that it's extremely difficult for someone outside SonarSource to comply with our roadmap and expectations. Therefore, we typically only accept minor cosmetic changes and typo fixes.

With that in mind, if you would like to submit a code contribution, please create a pull request for this repository. Please explain your motives to contribute this change: what problem you are trying to fix, what improvement you are trying to make.

Make sure that you follow our code style and all tests are passing (Travis build is executed for each pull request).

Developer documentation

How the plugin works

When the plugin is applied to a project, it will add to that project the SonarQube task. It will also add to the project and all it's subprojects the SonarQube extension. For multi-module projects, the plugin will only apply to the first project where it gets called. The goal is to allow the usage of allprojects {}, for example.

SonarQube extension The sonarqube extension enables a easy configuration of a project with the DSL.

SonarQube task The SonarQube task has the name sonarqube, so it can be executing by calling ./gradlew sonarqube. It collects information from the project and all its subprojects, generating the properties for the analysis. Then, it runs the SonarQube analysis using all those properties. The task depends on all compile and test tasks of all projects (except for skipped projects). If all projects are skipped (by adding skipProject=true to the sonarqube DSL), the analysis won't execute.

Using the plugin directly in a project (no need to build/install it in advance)

In the target project, apply as usual:

apply plugin: 'org.sonarqube'

Run with:

./gradlew sonarqube --include-build /path/to/sonar-scanner-gradle

Debugging the plugin

See the previous point about including the plugin's build when building a target project. To debug, simple add the parameter:

./gradlew sonarqube --include-build /path/to/sonar-scanner-gradle -Dorg.gradle.debug=true

Now debug remotely by connecting to port 5005.

Install a SNAPSHOT in local Maven repository

./gradlew publishToMavenLocal

Using the plugin SNAPSHOT previously installed in local Maven repository

buildscript {
    repositories { 
      mavenCentral()
      mavenLocal()
    }
    dependencies { classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:<THE VERSION>' }
}

apply plugin: 'org.sonarqube'

Release and deploy on Gradle plugin repository

https://plugins.gradle.org/docs/publish-plugin

./gradlew release

License

Copyright 2011-2022 SonarSource.

Licensed under the GNU Lesser General Public License, Version 3.0)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].