@@ -7,7 +7,7 @@ plugins {
7
7
`java- library`
8
8
`maven- publish`
9
9
signing
10
- id(" io.codearte. nexus-staging " ) version " 0.30 .0"
10
+ id(" io.github.gradle- nexus.publish-plugin " ) version " 2.0 .0"
11
11
kotlin(" jvm" ) version " 1.9.20"
12
12
id(" org.jetbrains.dokka" ) version " 1.8.10" // KDoc Documentation Builder
13
13
id(" com.github.breadmoirai.github-release" ) version " 2.4.1"
@@ -20,10 +20,10 @@ repositories {
20
20
dependencies {
21
21
implementation(" com.squareup.okhttp3:okhttp:4.12.0" )
22
22
23
- implementation(" com.fasterxml.jackson.core:jackson-core:2.15.3 " )
24
- implementation(" com.fasterxml.jackson.core:jackson-databind:2.15.3 " )
25
- implementation(" com.fasterxml.jackson.core:jackson-annotations:2.15.3 " )
26
- implementation(" com.fasterxml.jackson.module:jackson-module-kotlin:2.15.3 " )
23
+ implementation(" com.fasterxml.jackson.core:jackson-core:2.17.2 " )
24
+ implementation(" com.fasterxml.jackson.core:jackson-databind:2.17.2 " )
25
+ implementation(" com.fasterxml.jackson.core:jackson-annotations:2.17.2 " )
26
+ implementation(" com.fasterxml.jackson.module:jackson-module-kotlin:2.17.2 " )
27
27
28
28
implementation(" org.slf4j:slf4j-api:2.0.9" )
29
29
@@ -62,27 +62,24 @@ val sourcesJar by tasks.registering(Jar::class) {
62
62
from(sourceSets.main.get().allSource)
63
63
}
64
64
65
- nexusStaging {
66
- serverUrl = " https://s01.oss.sonatype.org/service/local/"
67
- packageGroup = " com.cjcrafter"
68
- stagingProfileId = findProperty(" OSSRH_ID" ).toString()
69
- username = findProperty(" OSSRH_USERNAME" ).toString()
70
- password = findProperty(" OSSRH_PASSWORD" ).toString()
71
- numberOfRetries = 30
72
- delayBetweenRetriesInMillis = 3000
65
+ nexusPublishing {
66
+ repositories {
67
+ sonatype {
68
+ nexusUrl.set(uri(" https://s01.oss.sonatype.org/service/local/" ))
69
+ snapshotRepositoryUrl.set(uri(" https://s01.oss.sonatype.org/content/repositories/snapshots/" ))
70
+ username.set(System .getenv(" OSSRH_USERNAME" ) ? : findProperty(" OSSRH_USERNAME" ).toString())
71
+ password.set(System .getenv(" OSSRH_PASSWORD" ) ? : findProperty(" OSSRH_PASSWORD" ).toString())
72
+ }
73
+ }
73
74
}
74
75
75
- // Signing artifacts
76
76
signing {
77
77
isRequired = true
78
- // useGpgCmd()
79
-
80
78
useInMemoryPgpKeys(
81
- findProperty(" SIGNING_KEY_ID" ).toString(),
82
- findProperty(" SIGNING_PRIVATE_KEY" ).toString(),
83
- findProperty(" SIGNING_PASSWORD" ).toString()
79
+ System .getenv( " SIGNING_KEY_ID " ) ? : findProperty(" SIGNING_KEY_ID" ).toString(),
80
+ System .getenv( " SIGNING_PRIVATE_KEY " ) ? : findProperty(" SIGNING_PRIVATE_KEY" ).toString(),
81
+ System .getenv( " SIGNING_PASSWORD " ) ? : findProperty(" SIGNING_PASSWORD" ).toString(),
84
82
)
85
- // sign(configurations["archives"])
86
83
sign(publishing.publications)
87
84
}
88
85
@@ -123,20 +120,10 @@ publishing {
123
120
}
124
121
}
125
122
}
126
-
127
- repositories {
128
- maven {
129
- url = uri(" https://s01.oss.sonatype.org/service/local/staging/deploy/maven2" )
130
- credentials {
131
- username = findProperty(" OSSRH_USERNAME" ).toString()
132
- password = findProperty(" OSSRH_PASSWORD" ).toString()
133
- }
134
- }
135
- }
136
123
}
137
124
138
125
// After publishing, the nexus plugin will automatically close and release
139
- tasks.named(" publish " ) {
126
+ tasks.named(" publishToSonatypeRepository " ) {
140
127
finalizedBy(" closeAndReleaseRepository" , " createGithubRelease" )
141
128
}
142
129
0 commit comments