14
14
*/
15
15
16
16
import com.github.spotbugs.snom.Effort
17
+ import org.jreleaser.model.Active
17
18
18
19
plugins {
19
20
`java- library`
@@ -22,7 +23,7 @@ plugins {
22
23
checkstyle
23
24
jacoco
24
25
id(" com.github.spotbugs" ) version " 6.0.8"
25
- id(" io.codearte.nexus-staging " ) version " 0.30 .0"
26
+ id(" org.jreleaser " ) version " 1.9 .0"
26
27
}
27
28
28
29
allprojects {
@@ -37,27 +38,6 @@ tasks["jar"].enabled = false
37
38
val sonatypeUser: String? by project
38
39
val sonatypePassword: String? by project
39
40
40
- /*
41
- * Sonatype Staging Finalization
42
- * ====================================================
43
- *
44
- * When publishing to Maven Central, we need to close the staging
45
- * repository and release the artifacts after they have been
46
- * validated. This configuration is for the root project because
47
- * it operates at the "group" level.
48
- */
49
- if (sonatypeUser != null && sonatypePassword != null ) {
50
- apply (plugin = " io.codearte.nexus-staging" )
51
-
52
- nexusStaging {
53
- packageGroup = " software.amazon"
54
- stagingProfileId = " e789115b6c941"
55
-
56
- username = sonatypeUser
57
- password = sonatypePassword
58
- }
59
- }
60
-
61
41
repositories {
62
42
mavenLocal()
63
43
mavenCentral()
@@ -140,12 +120,9 @@ subprojects {
140
120
141
121
publishing {
142
122
repositories {
143
- mavenCentral {
144
- url = uri(" https://aws.oss.sonatype.org/service/local/staging/deploy/maven2/" )
145
- credentials {
146
- username = sonatypeUser
147
- password = sonatypePassword
148
- }
123
+ maven {
124
+ name = " stagingRepository"
125
+ url = uri(" ${rootProject.buildDir} /staging" )
149
126
}
150
127
}
151
128
@@ -162,7 +139,7 @@ subprojects {
162
139
pom {
163
140
name.set(subproject.extra[" displayName" ].toString())
164
141
description.set(subproject.description)
165
- url.set(" https://github.com/awslabs /smithy" )
142
+ url.set(" https://github.com/smithy-lang /smithy-typescript " )
166
143
licenses {
167
144
license {
168
145
name.set(" Apache License 2.0" )
@@ -180,7 +157,7 @@ subprojects {
180
157
}
181
158
}
182
159
scm {
183
- url.set(" https://github.com/awslabs /smithy.git" )
160
+ url.set(" https://github.com/smithy-lang /smithy-typescript .git" )
184
161
}
185
162
}
186
163
}
@@ -259,3 +236,51 @@ subprojects {
259
236
}
260
237
}
261
238
}
239
+
240
+ /*
241
+ * Jreleaser (https://jreleaser.org) config.
242
+ */
243
+ jreleaser {
244
+ dryrun = false
245
+
246
+ // Used for creating a tagged release, uploading files and generating changelog.
247
+ // In the future we can set this up to push release tags to GitHub, but for now it's
248
+ // set up to do nothing.
249
+ // https://jreleaser.org/guide/latest/reference/release/index.html
250
+ release {
251
+ generic {
252
+ enabled = true
253
+ skipRelease = true
254
+ }
255
+ }
256
+
257
+ // Used to announce a release to configured announcers.
258
+ // https://jreleaser.org/guide/latest/reference/announce/index.html
259
+ announce {
260
+ active = Active .NEVER
261
+ }
262
+
263
+ // Signing configuration.
264
+ // https://jreleaser.org/guide/latest/reference/signing.html
265
+ signing {
266
+ active = Active .ALWAYS
267
+ armored = true
268
+ }
269
+
270
+ // Configuration for deploying to Maven Central.
271
+ // https://jreleaser.org/guide/latest/examples/maven/maven-central.html#_gradle
272
+ deploy {
273
+ maven {
274
+ nexus2 {
275
+ create(" maven-central" ) {
276
+ active = Active .ALWAYS
277
+ url = " https://aws.oss.sonatype.org/service/local"
278
+ snapshotUrl = " https://aws.oss.sonatype.org/content/repositories/snapshots"
279
+ closeRepository.set(true )
280
+ releaseRepository.set(true )
281
+ stagingRepositories.add(" ${rootProject.buildDir} /staging" )
282
+ }
283
+ }
284
+ }
285
+ }
286
+ }
0 commit comments