-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
108 lines (88 loc) · 2.85 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
plugins {
jacoco
`java-library`
`maven-publish`
signing
}
dependencies {
compileOnly("org.jetbrains:annotations:26.0.1")
testImplementation("org.assertj:assertj-core:3.26.3")
testImplementation("org.jetbrains:annotations:26.0.1")
testImplementation("org.junit.jupiter:junit-jupiter:5.11.3")
testImplementation("org.postgresql:postgresql:42.7.4")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
withJavadocJar()
withSourcesJar()
}
tasks.named<Test>("test") {
useJUnitPlatform()
finalizedBy(tasks.jacocoTestReport)
}
tasks.jacocoTestReport {
dependsOn(tasks.test)
reports {
xml.required.set(true)
html.required.set(false)
}
}
tasks.javadoc {
(options as StandardJavadocDocletOptions).links?.add("https://docs.oracle.com/en/java/javase/11/docs/api/")
}
repositories {
mavenCentral()
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
pom {
groupId = "com.nebhale"
artifactId = "service-bindings"
version = "1.0.0"
name.set("Service Bindings for Kubernetes")
description.set("A library to access Service Binding Specification for Kubernetes conformant Service Binding Workload Projections.")
url.set("https://github.com/nebhale/client-jvm")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
name.set("Ben Hale")
email.set("[email protected]")
url.set("https://github.com/nebhale")
}
}
scm {
connection.set("scm:git:https://github.com/nebhale/client-jvm.git")
developerConnection.set("scm:git:https://github.com/nebhale/client-jvm.git")
url.set("https://github.com/nebhale/client-jvm")
}
}
}
}
repositories {
maven {
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2")
credentials {
if (project.hasProperty("ossrh.username")) {
username = project.property("ossrh.username") as String
}
if (project.hasProperty("ossrh.password")) {
password = project.property("ossrh.password") as String
}
}
}
}
}
signing {
useGpgCmd()
sign(publishing.publications["maven"])
}