@@ -5,11 +5,13 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat
5
5
plugins {
6
6
`java- library`
7
7
`maven- publish`
8
+ `signing`
8
9
id(" com.gradleup.shadow" ) version " 9.0.0-beta13"
9
10
id(" io.github.patrick.remapper" ) version " 1.4.2"
11
+ id(" com.vanniktech.maven.publish" ) version " 0.34.0"
10
12
}
11
13
12
- group = " com.comphenix.protocol "
14
+ group = " net.dmulloy2 "
13
15
description = " Provides access to the Minecraft protocol"
14
16
15
17
val mcVersion = " 1.21.7"
@@ -125,84 +127,47 @@ tasks {
125
127
compileJava {
126
128
options.encoding = " UTF-8"
127
129
}
130
+ }
128
131
129
- register< org.gradle.jvm.tasks.Jar > (" javadocJar" ) {
130
- archiveClassifier.set(" javadoc" )
131
- from(getByName(" javadoc" ))
132
- }
132
+ mavenPublishing {
133
+ publishToMavenCentral()
134
+ signAllPublications()
133
135
134
- register< org.gradle.jvm.tasks.Jar > (" sourcesJar" ) {
135
- archiveClassifier.set(" sources" )
136
- from(project.the<JavaPluginExtension >().sourceSets[" main" ].allJava)
137
- }
138
- }
136
+ coordinates(" ${group} " , project.name, " ${version} " )
137
+
138
+ pom {
139
+ name.set(project.name)
140
+ description.set(project.description)
141
+ inceptionYear.set(" 2012" )
142
+ url.set(" https://github.com/dmulloy2/ProtocolLib" )
139
143
140
- publishing {
141
- publications {
142
- create<MavenPublication >(" maven" ) {
143
- from(components[" java" ])
144
- artifact(tasks.getByName(" sourcesJar" ))
145
- artifact(tasks.getByName(" javadocJar" ))
146
-
147
- pom {
148
- name.set(project.name)
149
- description.set(project.description)
150
- url.set(" https://github.com/dmulloy2/ProtocolLib" )
151
-
152
- developers {
153
- developer {
154
- id.set(" dmulloy2" )
155
- name.set(" Dan Mulloy" )
156
- url.set(" https://dmulloy2.net/" )
157
- }
158
- developer {
159
- id.set(" aadnk" )
160
-
161
- name.set(" Kristian S. Stangeland" )
162
- url.set(" https://comphenix.net/" )
163
- }
164
- }
165
-
166
- licenses {
167
- license {
168
- name.set(" GNU GENERAL PUBLIC LICENSE - Version 2, June 1991" )
169
- url.set(" https://www.gnu.org/licenses/gpl-2.0.txt" )
170
- distribution.set(" repo" )
171
- }
172
- }
173
-
174
- scm {
175
- tag.set(" HEAD" )
176
- url.set(" https://github.com/dmulloy2/ProtocolLib" )
177
- connection.set(" scm:git:git://github.com/dmulloy2/ProtocolLib.git" )
178
- developerConnection.set(
" scm:git:[email protected] :dmulloy2/ProtocolLib.git" )
179
- }
180
-
181
- issueManagement {
182
- system.set(" GitHub Issues" )
183
- url.set(" https://github.com/dmulloy2/ProtocolLib/issues" )
184
- }
185
-
186
- ciManagement {
187
- system.set(" Jenkins" )
188
- url.set(" https://ci.dmulloy2.net/job/ProtocolLib" )
189
- }
144
+ developers {
145
+ developer {
146
+ id.set(" dmulloy2" )
147
+ name.set(" Dan Mulloy" )
148
+ url.set(" https://dmulloy2.net/" )
149
+
190
150
}
191
151
}
192
- }
193
152
194
- repositories {
195
- maven {
196
- url = if (isSnapshot) {
197
- uri(" https://repo.dmulloy2.net/repository/snapshots/" )
198
- } else {
199
- uri(" https://repo.dmulloy2.net/repository/releases/" )
153
+ licenses {
154
+ license {
155
+ name.set(" GNU GENERAL PUBLIC LICENSE - Version 2, June 1991" )
156
+ url.set(" https://www.gnu.org/licenses/gpl-2.0.txt" )
157
+ distribution.set(" repo" )
200
158
}
159
+ }
201
160
202
- credentials {
203
- username = System .getenv(" NEXUS_USERNAME" )
204
- password = System .getenv(" NEXUS_PASSWORD" )
205
- }
161
+ scm {
162
+ tag.set(" HEAD" )
163
+ url.set(" https://github.com/dmulloy2/ProtocolLib" )
164
+ connection.set(" scm:git:git://github.com/dmulloy2/ProtocolLib.git" )
165
+ developerConnection.set(
" scm:git:[email protected] :dmulloy2/ProtocolLib.git" )
166
+ }
167
+
168
+ issueManagement {
169
+ system.set(" GitHub Issues" )
170
+ url.set(" https://github.com/dmulloy2/ProtocolLib/issues" )
206
171
}
207
172
}
208
173
}
0 commit comments