Skip to content

Commit cc70701

Browse files
committed
Update publishing
1 parent a9ce6ff commit cc70701

File tree

7 files changed

+20
-38
lines changed

7 files changed

+20
-38
lines changed

.github/workflows/gradle-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ jobs:
3434
run: |
3535
VERSION="${GITHUB_REF_NAME#v}" # removes leading 'v' from tag name
3636
echo "Publishing version $VERSION"
37-
./gradlew -Pversion="$VERSION" -Psign publishAllPublicationsToCentralPortal
37+
./gradlew -Pversion="$VERSION" -Psign publishAggregationToCentralPortal

PUBLISHING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ SIGNING_PASSWORD=<PGP password>
1919
Artifacts are published to Maven Central via Sonatype, using following Gradle task.
2020

2121
```bash
22-
./gradlew -Pversion=<version> -Psign publishAllPublicationsToCentralPortal
22+
./gradlew -Pversion=<version> -Psign publishAggregationToCentralPortal
2323
```
2424

2525
This command uses `nmcp` Gradle plugin - [link](https://github.com/GradleUp/nmcp).

build.gradle.kts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import com.diffplug.spotless.LineEnding
22

33
plugins {
44
id("com.diffplug.spotless").version("8.0.0")
5+
id("com.gradleup.nmcp.aggregation").version("1.2.0")
56
id("com.gradleup.nmcp").version("1.2.0").apply(false)
67
}
78

@@ -35,6 +36,22 @@ repositories {
3536
mavenCentral()
3637
}
3738

39+
dependencies {
40+
nmcpAggregation(project(":problem4j-spring-bom"))
41+
nmcpAggregation(project(":problem4j-spring-web"))
42+
nmcpAggregation(project(":problem4j-spring-webflux"))
43+
nmcpAggregation(project(":problem4j-spring-webmvc"))
44+
}
45+
46+
nmcpAggregation {
47+
centralPortal {
48+
username = System.getenv("PUBLISHING_USERNAME")
49+
password = System.getenv("PUBLISHING_PASSWORD")
50+
51+
publishingType = "USER_MANAGED"
52+
}
53+
}
54+
3855
spotless {
3956
format("misc") {
4057
target("**/*.gradle.kts", "**/.gitattributes", "**/.gitignore")

problem4j-spring-bom/build.gradle.kts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ dependencies {
1818
api(project(":problem4j-spring-webmvc"))
1919
}
2020
}
21+
2122
publishing {
2223
publications {
2324
create<MavenPublication>("maven") {
@@ -58,15 +59,6 @@ publishing {
5859
}
5960
}
6061

61-
nmcp {
62-
publishAllPublicationsToCentralPortal {
63-
username = System.getenv("PUBLISHING_USERNAME")
64-
password = System.getenv("PUBLISHING_PASSWORD")
65-
66-
publishingType = "USER_MANAGED"
67-
}
68-
}
69-
7062
signing {
7163
if (project.hasProperty("sign")) {
7264
useInMemoryPgpKeys(

problem4j-spring-web/build.gradle.kts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,6 @@ publishing {
7878
}
7979
}
8080

81-
nmcp {
82-
publishAllPublicationsToCentralPortal {
83-
username = System.getenv("PUBLISHING_USERNAME")
84-
password = System.getenv("PUBLISHING_PASSWORD")
85-
86-
publishingType = "USER_MANAGED"
87-
}
88-
}
89-
9081
signing {
9182
if (project.hasProperty("sign")) {
9283
useInMemoryPgpKeys(

problem4j-spring-webflux/build.gradle.kts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,6 @@ publishing {
7474
}
7575
}
7676

77-
nmcp {
78-
publishAllPublicationsToCentralPortal {
79-
username = System.getenv("PUBLISHING_USERNAME")
80-
password = System.getenv("PUBLISHING_PASSWORD")
81-
82-
publishingType = "USER_MANAGED"
83-
}
84-
}
85-
8677
signing {
8778
if (project.hasProperty("sign")) {
8879
useInMemoryPgpKeys(

problem4j-spring-webmvc/build.gradle.kts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,6 @@ publishing {
7777
}
7878
}
7979

80-
nmcp {
81-
publishAllPublicationsToCentralPortal {
82-
username = System.getenv("PUBLISHING_USERNAME")
83-
password = System.getenv("PUBLISHING_PASSWORD")
84-
85-
publishingType = "USER_MANAGED"
86-
}
87-
}
88-
8980
signing {
9081
if (project.hasProperty("sign")) {
9182
useInMemoryPgpKeys(

0 commit comments

Comments
 (0)