Skip to content

Commit e8a06b4

Browse files
authored
Updating build script to remove some previous workarounds. (#2573)
1 parent 221d158 commit e8a06b4

File tree

1 file changed

+31
-42
lines changed

1 file changed

+31
-42
lines changed

build.gradle.kts

+31-42
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import org.jreleaser.model.Active
1818

1919
plugins {
2020
java
21-
alias(libs.plugins.jreleaser) apply false
21+
alias(libs.plugins.jreleaser)
2222
}
2323

2424
// Load the Smithy version from VERSION.
@@ -53,54 +53,43 @@ afterEvaluate {
5353
}
5454
}
5555

56-
// We're using JReleaser in the smithy-cli subproject, so we want to have a flag to control
57-
// which JReleaser configuration to use to prevent conflicts
58-
if (project.hasProperty("release.main")) {
59-
apply(plugin = "org.jreleaser")
56+
configure<JReleaserExtension> {
57+
dryrun = false
6058

61-
// Workaround for https://github.com/jreleaser/jreleaser/issues/1492
62-
tasks.register("clean")
63-
64-
configure<JReleaserExtension> {
65-
dryrun = false
66-
67-
// Used for creating and pushing the version tag, but this configuration ensures that
68-
// an actual GitHub release isn't created (since the CLI release does that)
69-
release {
70-
github {
71-
skipRelease = true
72-
tagName = "{{projectVersion}}"
73-
}
59+
release {
60+
generic {
61+
skipTag = true
7462
}
63+
}
7564

76-
// Used to announce a release to configured announcers.
77-
// https://jreleaser.org/guide/latest/reference/announce/index.html
78-
announce {
79-
active = Active.NEVER
80-
}
65+
// Used to announce a release to configured announcers.
66+
// https://jreleaser.org/guide/latest/reference/announce/index.html
67+
announce {
68+
active = Active.NEVER
69+
}
8170

82-
// Signing configuration.
83-
// https://jreleaser.org/guide/latest/reference/signing.html
84-
signing {
85-
active = Active.ALWAYS
86-
armored = true
87-
}
71+
// Signing configuration.
72+
// https://jreleaser.org/guide/latest/reference/signing.html
73+
signing {
74+
active = Active.ALWAYS
75+
armored = true
76+
}
8877

89-
// Configuration for deploying to Maven Central.
90-
// https://jreleaser.org/guide/latest/examples/maven/maven-central.html#_gradle
91-
deploy {
92-
maven {
93-
nexus2 {
94-
create("maven-central") {
95-
active = Active.ALWAYS
96-
url = "https://aws.oss.sonatype.org/service/local"
97-
snapshotUrl = "https://aws.oss.sonatype.org/content/repositories/snapshots"
98-
closeRepository = true
99-
releaseRepository = true
100-
stagingRepository(stagingDir().get().asFile.path)
101-
}
78+
// Configuration for deploying to Maven Central.
79+
// https://jreleaser.org/guide/latest/examples/maven/maven-central.html#_gradle
80+
deploy {
81+
maven {
82+
nexus2 {
83+
create("maven-central") {
84+
active = Active.ALWAYS
85+
url = "https://aws.oss.sonatype.org/service/local"
86+
snapshotUrl = "https://aws.oss.sonatype.org/content/repositories/snapshots"
87+
closeRepository = true
88+
releaseRepository = true
89+
stagingRepository(stagingDir().get().asFile.path)
10290
}
10391
}
10492
}
10593
}
10694
}
95+

0 commit comments

Comments
 (0)