1
1
import org.asciidoctor.gradle.jvm.AsciidoctorTask
2
+ import io.gitee.pkmer.enums.PublishingType
2
3
3
4
/*
4
5
* Copyright 2022 Intershop Communications AG.
@@ -43,6 +44,8 @@ plugins {
43
44
id(" com.gradle.plugin-publish" ) version " 1.3.0"
44
45
45
46
id(" com.dorongold.task-tree" ) version " 4.0.0"
47
+
48
+ id(" io.gitee.pkmer.pkmerboot-central-publisher" ) version " 1.1.1"
46
49
}
47
50
48
51
// release configuration
@@ -211,6 +214,8 @@ tasks {
211
214
}
212
215
}
213
216
217
+ val stagingRepoDir = project.layout.buildDirectory.dir(" stagingRepo" )
218
+
214
219
publishing {
215
220
publications {
216
221
create(" intershopMvn" , MavenPublication ::class .java) {
@@ -224,7 +229,8 @@ publishing {
224
229
artifact(File (buildDir, " docs/asciidoc/docbook/README.xml" )) {
225
230
classifier = " docbook"
226
231
}
227
-
232
+ }
233
+ withType<MavenPublication >().configureEach {
228
234
pom {
229
235
name.set(project.name)
230
236
description.set(project.description)
@@ -268,6 +274,23 @@ publishing {
268
274
}
269
275
}
270
276
277
+ pkmerBoot {
278
+ sonatypeMavenCentral{
279
+ // the same with publishing.repositories.maven.url in the configuration.
280
+ stagingRepository = stagingRepoDir
281
+
282
+ /* *
283
+ * get username and password from
284
+ * <a href="https://central.sonatype.com/account"> central sonatype account</a>
285
+ */
286
+ username = sonatypeUsername
287
+ password = sonatypePassword
288
+
289
+ // Optional the publishingType default value is PublishingType.AUTOMATIC
290
+ publishingType = PublishingType .USER_MANAGED
291
+ }
292
+ }
293
+
271
294
signing {
272
295
sign(publishing.publications[" intershopMvn" ])
273
296
}
0 commit comments