Moved Sonarqube to GitHub action.

This commit is contained in:
Erik C. Thauvin 2021-05-19 21:54:21 -07:00
parent f575b67436
commit 547d235ecb
6 changed files with 48 additions and 22 deletions

View file

@ -1,12 +1,13 @@
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
import java.io.FileInputStream
import java.util.*
plugins {
id("com.github.ben-manes.versions") version "0.38.0"
id("io.gitlab.arturbosch.detekt") version "1.16.0"
id("io.gitlab.arturbosch.detekt") version "1.17.0"
id("org.jetbrains.dokka") version "1.4.32"
id("org.jetbrains.kotlin.jvm") version "1.5.0"
id("org.sonarqube") version "3.2.0"
@ -48,13 +49,15 @@ java {
}
detekt {
toolVersion = "main-SNAPSHOT"
//toolVersion = "main-SNAPSHOT"
baseline = project.rootDir.resolve("config/detekt/baseline.xml")
}
sonarqube {
properties {
property("sonar.projectKey", "ethauvin_$name")
property("sonar.organization", "ethauvin-github")
property("sonar.host.url", "https://sonarcloud.io")
property("sonar.sourceEncoding", "UTF-8")
}
}
@ -67,12 +70,13 @@ val javadocJar by tasks.creating(Jar::class) {
tasks {
withType<KotlinCompile>().configureEach {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.jvmTarget = java.targetCompatibility.toString()
}
withType<Test> {
testLogging {
exceptionFormat = TestExceptionFormat.FULL
events = setOf(TestLogEvent.PASSED, TestLogEvent.SKIPPED, TestLogEvent.FAILED)
}
}