-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle.kts
102 lines (85 loc) · 2.47 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
`java-gradle-plugin`
`maven-publish`
jacoco
kotlin("jvm") version "1.3.72"
id("com.github.ben-manes.versions") version "0.36.0"
id("com.gradle.plugin-publish") version "0.12.0"
id("io.gitlab.arturbosch.detekt") version "1.14.2"
id("org.gradle.kotlin.kotlin-dsl") version "1.3.6"
id("org.sonarqube") version "3.0"
}
version = "1.0.5-beta"
group = "net.thauvin.erik.gradle"
object VersionInfo {
const val spek = "2.0.13"
}
val versions: VersionInfo by extra { VersionInfo }
val github = "https://github.com/ethauvin/semver-gradle"
val packageName = "net.thauvin.erik.gradle.semver"
repositories {
jcenter()
}
dependencies {
implementation(gradleApi())
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
implementation(kotlin("stdlib"))
testImplementation(kotlin("reflect"))
testImplementation(kotlin("test"))
testImplementation(gradleTestKit())
testImplementation("org.spekframework.spek2:spek-dsl-jvm:${versions.spek}")
testRuntimeOnly("org.spekframework.spek2:spek-runner-junit5:${versions.spek}")
}
tasks {
withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
// Gradle 4.6
kotlinOptions.apiVersion = "1.2"
}
withType<Test> {
useJUnitPlatform {
includeEngines("spek2")
}
}
withType<JacocoReport> {
reports {
html.isEnabled = true
xml.isEnabled = true
}
}
"sonarqube" {
dependsOn("jacocoTestReport")
}
}
detekt {
// input = files("src/main/kotlin", "src/test/kotlin")
// filters = ".*/resources/.*,.*/build/.*"
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 {
plugins {
create(project.name) {
id = packageName
displayName = "SemVer Plugin"
description = "Semantic Version Plugin for Gradle"
implementationClass = "$packageName.SemverPlugin"
}
}
}
pluginBundle {
website = github
vcsUrl = github
tags = listOf("semver", "semantic", "version", "versioning", "auto-increment", "kotlin", "java")
mavenCoordinates {
groupId = project.group.toString()
artifactId = project.name
}
}