-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle.kts
75 lines (62 loc) · 2.05 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
plugins {
id("java")
alias(libs.plugins.nexus.publish)
}
group = "dev.httpmarco"
version = "1.0.1-SNAPSHOT"
repositories {
mavenCentral()
}
dependencies {
testImplementation(platform(rootProject.libs.junitBom))
testImplementation(rootProject.libs.bundles.testing)
testAnnotationProcessor(rootProject.libs.lombok)
implementation(rootProject.libs.netty5)
implementation(rootProject.libs.bundles.utils)
annotationProcessor(rootProject.libs.lombok)
}
tasks.test {
useJUnitPlatform()
}
allprojects {
apply(plugin = "maven-publish")
}
extensions.configure<PublishingExtension> {
publications {
create("library", MavenPublication::class.java) {
from(project.components.getByName("java"))
pom {
name.set(project.name)
url.set("https://github.com/httpmarco/netline")
description.set("Simple network library for Java, based on Netty 5")
licenses {
license {
name.set("MIT License")
url.set("https://opensource.org/licenses/MIT")
}
}
developers {
developer {
name.set("Mirco Lindenau")
email.set("[email protected]")
}
}
scm {
url.set("https://github.com/httpmarco/netline")
connection.set("https://github.com/httpmarco/netline.git")
}
}
}
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
username.set(System.getenv("ossrhUsername")?.toString() ?: "")
password.set(System.getenv("ossrhPassword")?.toString() ?: "")
}
}
useStaging.set(!project.rootProject.version.toString().endsWith("-SNAPSHOT"))
}