-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle.kts
76 lines (67 loc) · 2.35 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
plugins {
id("org.jetbrains.kotlin.jvm") version "2.1.0"
kotlin("plugin.serialization") version "2.1.0"
`maven-publish`
id("org.jetbrains.kotlinx.kover") version "0.9.0"
signing
id("io.github.platan.tests-execution-chart")
}
dependencies {
api("org.jetbrains.kotlin:kotlin-stdlib")
implementation("org.apache.commons:commons-text:1.13.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.1")
testImplementation(platform("org.codehaus.groovy:groovy-bom:3.0.22"))
testImplementation("org.codehaus.groovy:groovy")
testImplementation(platform("org.spockframework:spock-bom:2.4-M2-groovy-3.0"))
testImplementation("org.spockframework:spock-core")
}
java {
withSourcesJar()
withJavadocJar()
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
pom {
name.set("$groupId:$artifactId")
description.set("Visualise tests execution schedule")
url.set("https://github.com/platan/tests-execution-chart")
licenses {
license {
name.set("MIT License")
url.set("https://github.com/platan/tests-execution-chart/blob/main/LICENSE")
}
}
developers {
developer {
id.set("platan")
name.set("Marcin Mielnicki")
email.set("[email protected]")
}
}
scm {
connection.set("scm:git:git://github.com/platan/tests-execution-chart.git")
developerConnection.set("scm:git:ssh://github.com:platan/tests-execution-chart.git")
url.set("https://github.com/platan/tests-execution-chart/tree/main")
}
}
}
}
}
tasks.test {
finalizedBy(tasks.koverHtmlReport, tasks.koverXmlReport)
}
tasks.koverXmlReport {
dependsOn(tasks.test)
}
tasks.koverHtmlReport {
dependsOn(tasks.test)
}
extra["isReleaseVersion"] = !version.toString().endsWith("SNAPSHOT")
signing {
setRequired({
(project.extra["isReleaseVersion"] as Boolean) && gradle.taskGraph.hasTask("publishToSonatype")
})
sign(publishing.publications["mavenJava"])
}