-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
88 lines (78 loc) · 1.72 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
plugins {
java
`maven-publish`
signing
}
apply(from = "deps.gradle.kts")
group = Project.group
version = Project.version
java {
sourceCompatibility = Jvm.target
targetCompatibility = Jvm.target
withSourcesJar()
withJavadocJar()
}
repositories {
jcenter()
}
val test by tasks.getting(Test::class) {
// Use junit platform for unit tests
useJUnitPlatform()
}
plugins.withType<JavaPlugin>().configureEach {
configure<JavaPluginExtension> {
modularity.inferModulePath.set(true)
}
}
publishing {
repositories {
maven {
name = "nexus"
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = project.findProperty("nexus.user") as String? ?: ""
password = project.findProperty("nexus.pass") as String? ?: ""
}
}
}
publications {
create<MavenPublication>("maven") {
from(components["java"])
pom {
name.set(Project.name)
description.set(Project.description)
url.set(Project.site)
licenses {
license {
name.set(Project.license)
}
}
developers {
Details.developers.forEach {
developer {
id.set(it.id)
name.set(it.name)
email.set(it.email)
url.set(it.site)
}
}
}
scm {
connection.set(Scm.connection)
developerConnection.set(Scm.devConnection)
url.set(Scm.url)
}
}
}
}
}
artifacts {
archives(tasks["sourcesJar"])
archives(tasks["javadocJar"])
archives(tasks["jar"])
}
signing {
useGpgCmd()
sign(configurations.archives.get())
sign(publishing.publications["maven"])
}