-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle.kts
99 lines (88 loc) · 2.71 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
plugins {
`java-library`
`maven-publish`
`signing`
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(11))
vendor.set(JvmVendorSpec.AZUL)
}
}
repositories {
mavenCentral()
}
dependencies {
api("org.junit.jupiter:junit-jupiter-api:5.10.0")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.0")
testImplementation("com.approvaltests:approvaltests:18.7.1")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.0")
}
tasks.register<Test>("testsOn17") {
javaLauncher.set(javaToolchains.launcherFor {
languageVersion.set(JavaLanguageVersion.of(17))
})
}
val test by tasks.getting(Test::class) {
useJUnitPlatform()
testLogging {
showExceptions = true
showStackTraces = true
}
}
java {
withJavadocJar()
withSourcesJar()
}
publishing {
repositories {
maven {
name = "sonatype"
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = project.findProperty("sonatypeUsername") as String?
password = project.findProperty("sonatypePassword") as String?
}
}
}
publications {
create<MavenPublication>("sonatype") {
artifactId = "junit-tcr-extensions"
group = "com.larseckart"
version = "0.0.3"
from(components["java"])
pom {
name.set("JUnit5 extensions for text-commit-revert")
url.set("https://github.com/LarsEckart/tcr-extension")
description.set("JUnit 5 Extension for test-commit-revert")
licenses {
license {
name.set("Apache License 2.0")
url.set("http://www.apache.org/licenses/")
}
}
developers {
developer {
id.set("larseckart")
name.set("Lars Eckart")
email.set("lars.eckart@hey.com")
}
}
scm {
connection.set("scm:git:git@github.com:larseckart/tcr-extension.git")
url.set("https://github.com/larseckart/tcr-extension")
}
issueManagement {
url.set("https://github.com/larseckart/tcr-extension/issues")
system.set("GitHub")
}
}
}
}
}
signing {
val signingKey: String? by project
val signingPassword: String? by project
useInMemoryPgpKeys(signingKey, signingPassword)
sign(publishing.publications["sonatype"])
}