Skip to content

Commit ae292c4

Browse files
Configure API for nexus publishing
1 parent f5f852c commit ae292c4

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,82 @@
11
plugins {
22
`java-library`
3+
`maven-publish`
4+
signing
35
}
46

57
dependencies {
68
implementation("com.flowpowered:flow-nbt:2.0.2")
79
compileOnly("io.papermc.paper:paper-api:1.17.1-R0.1-SNAPSHOT")
810
}
911

12+
java {
13+
withSourcesJar()
14+
withJavadocJar()
15+
}
16+
17+
publishing {
18+
publications {
19+
create<MavenPublication>("maven") {
20+
groupId = "${project.group}"
21+
artifactId = project.name
22+
version = "${project.version}"
23+
24+
from(components["java"])
25+
26+
pom {
27+
name.set("Advanced Slime World Manager API")
28+
description.set("API for ASWM")
29+
url.set("https://github.com/Paul19988/Advanced-Slime-World-Manager")
30+
licenses {
31+
license {
32+
name.set("GNU General Public License, Version 3.0")
33+
url.set("https://www.gnu.org/licenses/gpl-3.0.txt")
34+
}
35+
}
36+
developers {
37+
developer {
38+
id.set("InfernalSuite")
39+
name.set("The InfernalSuite Team")
40+
url.set("https://github.com/InfernalSuite")
41+
email.set("infernalsuite@gmail.com")
42+
}
43+
}
44+
scm {
45+
connection.set("scm:git:https://github.com/Paul19988/Advanced-Slime-World-Manager.git")
46+
developerConnection.set("scm:git:ssh://github.com/Paul19988/Advanced-Slime-World-Manager.git")
47+
url.set("https://github.com/Paul19988/Advanced-Slime-World-Manager/")
48+
}
49+
issueManagement {
50+
system.set("Github")
51+
url.set("https://github.com/Paul19988/Advanced-Slime-World-Manager/issues")
52+
}
53+
}
54+
55+
versionMapping {
56+
usage("java-api") {
57+
fromResolutionOf("runtimeClasspath")
58+
}
59+
usage("java-runtime") {
60+
fromResolutionResult()
61+
}
62+
}
63+
}
64+
}
65+
repositories {
66+
maven {
67+
name = "rapture"
68+
url = uri("https://repo.rapture.pw/repository/maven-snapshots/")
69+
credentials {
70+
username = project.property("raptureUsername") as String?
71+
password = project.property("rapturePassword") as String?
72+
}
73+
}
74+
}
75+
}
76+
77+
signing {
78+
useGpgCmd()
79+
sign(publishing.publications["maven"])
80+
}
81+
1082
description = "slimeworldmanager-api"

0 commit comments

Comments
 (0)