Skip to content

Instantly share code, notes, and snippets.

@sergiocasero
Last active March 30, 2021 08:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sergiocasero/25ffdf49dee35f9f7b040e5d76a85d5c to your computer and use it in GitHub Desktop.
Save sergiocasero/25ffdf49dee35f9f7b040e5d76a85d5c to your computer and use it in GitHub Desktop.
Add common code to sonarqube analysis
buildscript {
repositories {
// repos
}
dependencies {
// deps
}
}
plugins {
id("org.sonarqube") version "3.1.1"
}
sonarqube {
properties {
property("sonar.projectName", "PROJECT_NAME")
property("sonar.projectKey", "PROJECT_KEY")
property("sonar.login", "SONAR_TOKEN")
property("sonar.sources", "common/src/commonMain/kotlin") // Important line, add the common code
property("sonar.host.url", "SONARQUBE_URL")
property("sonar.links.homepage", "PROJECT_URL")
}
}
allprojects {
repositories {
// Your repos
}
}
tasks.register("clean", Delete::class) {
delete(rootProject.buildDir)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment