Added sonarcloud intergration.
This commit is contained in:
parent
c1f6360ec9
commit
04de55bac9
1 changed files with 45 additions and 9 deletions
|
@ -1,16 +1,25 @@
|
||||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||||
|
import org.junit.platform.gradle.plugin.JUnitPlatformExtension
|
||||||
|
|
||||||
plugins {
|
buildscript {
|
||||||
`kotlin-dsl`
|
dependencies {
|
||||||
`java-gradle-plugin`
|
classpath("org.junit.platform:junit-platform-gradle-plugin:1.0.0")
|
||||||
`maven-publish`
|
}
|
||||||
id("com.gradle.plugin-publish").version("0.10.1")
|
|
||||||
id("com.github.ben-manes.versions").version("0.21.0")
|
|
||||||
id("org.jlleitschuh.gradle.ktlint").version("7.2.1")
|
|
||||||
id("io.gitlab.arturbosch.detekt").version("1.0.0-RC14")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
version = "0.9.9-beta"
|
plugins {
|
||||||
|
`java-gradle-plugin`
|
||||||
|
`kotlin-dsl`
|
||||||
|
`maven-publish`
|
||||||
|
jacoco
|
||||||
|
id("com.github.ben-manes.versions").version("0.21.0")
|
||||||
|
id("com.gradle.plugin-publish").version("0.10.1")
|
||||||
|
id("io.gitlab.arturbosch.detekt").version("1.0.0-RC14")
|
||||||
|
id("org.jlleitschuh.gradle.ktlint").version("7.2.1")
|
||||||
|
id("org.sonarqube") version "2.7"
|
||||||
|
}
|
||||||
|
|
||||||
|
version = "1.0.0"
|
||||||
group = "net.thauvin.erik.gradle"
|
group = "net.thauvin.erik.gradle"
|
||||||
|
|
||||||
var github = "https://github.com/ethauvin/semver-gradle"
|
var github = "https://github.com/ethauvin/semver-gradle"
|
||||||
|
@ -22,6 +31,10 @@ repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
apply {
|
||||||
|
plugin("org.junit.platform.gradle.plugin")
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(gradleApi())
|
implementation(gradleApi())
|
||||||
|
|
||||||
|
@ -43,6 +56,10 @@ dependencies {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configure<JUnitPlatformExtension> {
|
||||||
|
enableStandardTestTask = true
|
||||||
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
withType<KotlinCompile> {
|
withType<KotlinCompile> {
|
||||||
kotlinOptions.jvmTarget = "1.8"
|
kotlinOptions.jvmTarget = "1.8"
|
||||||
|
@ -56,9 +73,20 @@ tasks {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
withType<JacocoReport> {
|
||||||
|
reports {
|
||||||
|
html.isEnabled = true
|
||||||
|
xml.isEnabled = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
"check" {
|
"check" {
|
||||||
dependsOn("ktlintCheck")
|
dependsOn("ktlintCheck")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
"sonarqube" {
|
||||||
|
dependsOn("jacocoTestReport")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
detekt {
|
detekt {
|
||||||
|
@ -67,6 +95,14 @@ detekt {
|
||||||
baseline = project.rootDir.resolve("detekt-baseline.xml")
|
baseline = project.rootDir.resolve("detekt-baseline.xml")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sonarqube {
|
||||||
|
properties {
|
||||||
|
property("sonar.projectName", "semver-gradle")
|
||||||
|
property("sonar.projectKey", "ethauvin_semver-gradle")
|
||||||
|
property("sonar.sourceEncoding", "UTF-8")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
gradlePlugin {
|
gradlePlugin {
|
||||||
plugins {
|
plugins {
|
||||||
create(project.name) {
|
create(project.name) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue