-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
123 lines (102 loc) · 3.21 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
plugins {
`java-library`
`maven-publish`
`signing`
id("io.github.gradle-nexus.publish-plugin") version "1.3.0"
id("net.researchgate.release") version "3.0.2"
}
group = "io.github.kiskae"
repositories {
mavenCentral()
}
dependencies {
implementation("com.google.testing.compile:compile-testing:0.18")
// jUnit5 API
api(platform("org.junit:junit-bom:5.3.2"))
api("org.junit.jupiter:junit-jupiter-api")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
java {
withJavadocJar()
withSourcesJar()
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
tasks {
withType<Test> {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
}
withType<JavaCompile> {
options.release.set(8)
}
withType<Javadoc> {
(options as StandardJavadocDocletOptions).apply {
// External APIs
links("https://docs.oracle.com/en/java/javase/20/docs/api/")
linksOffline(
"https://junit.org/junit5/docs/current/api/org.junit.jupiter.api/",
file("src/javadoc/junit5").absolutePath
)
// No part of the library is deprecated, so this is entirely redundant
noDeprecatedList(true)
if (JavaVersion.current().isJava9Compatible) {
addBooleanOption("html5", true)
}
}
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
}
}
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
val projectUrl = "github.com/kiskae/compile-testing-extension"
pom {
name.set(project.name)
description.set("JUnit5 extension based on Google's \"compile-testing\" library")
url.set("https://$projectUrl")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
issueManagement {
url.set("https://$projectUrl/issues")
}
developers {
developer {
id.set("kiskae")
name.set("Jeroen van Leusen")
email.set("[email protected]")
url.set("https://github.com/kiskae")
}
}
scm {
connection.set("scm:git:git://$projectUrl.git")
developerConnection.set("scm:git:git://$projectUrl.git")
url.set("https://$projectUrl")
}
}
}
}
}
signing {
useGpgCmd()
sign(publishing.publications["mavenJava"])
}
release {
git.requireBranch.set("master")
}