Skip to content

Commit 8c22c52

Browse files
committed
chore: Update release process to use jreleaser
1 parent 57c5bda commit 8c22c52

File tree

6 files changed

+80
-47
lines changed

6 files changed

+80
-47
lines changed

buildSrc/src/main/groovy/au.com.dius.pact.kotlin-library-conventions.gradle

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ plugins {
66
id 'java-library'
77

88
id 'maven-publish'
9-
id 'signing'
109
id 'org.jetbrains.dokka'
1110
}
1211

@@ -83,18 +82,7 @@ publishing {
8382
}
8483
repositories {
8584
maven {
86-
url "https://oss.sonatype.org/service/local/staging/deploy/maven2"
87-
if (project.hasProperty('sonatypeUsername')) {
88-
credentials {
89-
username sonatypeUsername
90-
password sonatypePassword
91-
}
92-
}
85+
url = rootProject.layout.buildDirectory.dir('staging-deploy')
9386
}
9487
}
9588
}
96-
97-
signing {
98-
required { project.hasProperty('isRelease') }
99-
sign publishing.publications.mavenPublication
100-
}

jreleaser.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
project:
2+
name: au.com.dius.pact
3+
version: 4.6.18
4+
description: Pact JVM
5+
longDescription: Pact JVM
6+
license: MIT
7+
links:
8+
homepage: https://github.com/pact-foundation/pact-jvm
9+
documentation: https://docs.pact.io
10+
inceptionYear: 2014
11+
authors:
12+
- Ronald Holshausen
13+
maintainers:
14+
- rholshausen
15+
languages:
16+
java:
17+
groupId: au.com.dius.pact
18+
version: 17
19+
20+
signing:
21+
active: ALWAYS
22+
armored: true
23+
mode: FILE
24+
25+
deploy:
26+
maven:
27+
mavenCentral:
28+
sonatype:
29+
active: ALWAYS
30+
url: https://central.sonatype.com/api/v1/publisher
31+
stagingRepositories:
32+
- build/staging-deploy

pact-jvm-server/build.gradle

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ plugins {
22
id 'au.com.dius.pact.kotlin-application-conventions'
33
id 'scala'
44
id 'maven-publish'
5-
id 'signing'
65
}
76

87
group = 'au.com.dius.pact'
@@ -87,18 +86,7 @@ publishing {
8786
}
8887
repositories {
8988
maven {
90-
url "https://oss.sonatype.org/service/local/staging/deploy/maven2"
91-
if (project.hasProperty('sonatypeUsername')) {
92-
credentials {
93-
username sonatypeUsername
94-
password sonatypePassword
95-
}
96-
}
89+
url = rootProject.layout.buildDirectory.dir('staging-deploy')
9790
}
9891
}
9992
}
100-
101-
signing {
102-
required { project.hasProperty('isRelease') }
103-
sign publishing.publications.serverDistribution
104-
}

provider/gradle/build.gradle

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
plugins {
22
id 'au.com.dius.pact.kotlin-common-conventions'
3-
id 'java-library'
4-
id 'java-gradle-plugin'
5-
id "com.gradle.plugin-publish" version "1.2.0"
3+
id 'maven-publish'
4+
id "com.gradle.plugin-publish" version "2.0.0"
65
}
76

87
group = 'au.com.dius.pact.provider'
8+
description = 'Pact-JVM - Gradle plugin for verifying pacts against a provider'
99

1010
dependencies {
1111
implementation gradleApi()
@@ -34,14 +34,12 @@ groovydoc {
3434
gradlePlugin {
3535
website = 'https://github.com/pact-foundation/pact-jvm/tree/master/provider/gradle'
3636
vcsUrl = 'https://github.com/pact-foundation/pact-jvm'
37-
plugins {
38-
pactProviderPlugin {
37+
plugins.create('pactProviderPlugin') {
3938
id = 'au.com.dius.pact'
4039
displayName = 'Gradle Pact Provider plugin'
4140
implementationClass = 'au.com.dius.pact.provider.gradle.PactPlugin'
4241
description = 'Gradle plugin for verifying pacts against a provider.'
4342
tags.set(['pact', 'cdc', 'consumerdrivencontracts', 'microservicetesting'])
44-
}
4543
}
4644
}
4745

@@ -86,18 +84,7 @@ publishing {
8684
}
8785
repositories {
8886
maven {
89-
url "https://oss.sonatype.org/service/local/staging/deploy/maven2"
90-
if (project.hasProperty('sonatypeUsername')) {
91-
credentials {
92-
username sonatypeUsername
93-
password sonatypePassword
94-
}
95-
}
87+
url = layout.buildDirectory.dir('staging-deploy')
9688
}
9789
}
9890
}
99-
100-
signing {
101-
required { project.hasProperty('isRelease') }
102-
sign publishing.publications.pluginMaven
103-
}

provider/gradle/jreleaser.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
project:
2+
name: au.com.dius.pact.provider
3+
version: 4.6.18
4+
description: Pact JVM Gradle Plugin
5+
longDescription: Pact JVM Gradle Plugin
6+
license: Apache2
7+
links:
8+
homepage: https://github.com/pact-foundation/pact-jvm
9+
documentation: https://docs.pact.io
10+
inceptionYear: 2014
11+
authors:
12+
- Ronald Holshausen
13+
maintainers:
14+
- rholshausen
15+
languages:
16+
java:
17+
groupId: au.com.dius.pact.provider
18+
version: 17
19+
20+
signing:
21+
active: ALWAYS
22+
armored: true
23+
mode: FILE
24+
25+
deploy:
26+
maven:
27+
mavenCentral:
28+
sonatype:
29+
active: ALWAYS
30+
url: https://central.sonatype.com/api/v1/publisher
31+
stagingRepositories:
32+
- build/staging-deploy

releasePrep.groovy

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,18 @@ ask('Tag and Push commits?: [Y]') {
113113
}
114114

115115
ask('Publish artifacts to maven central?: [Y]') {
116-
executeOnShell './gradlew clean publish -S -x :provider:gradle:publish -PisRelease=true'
117-
executeOnShell './gradlew :provider:gradle:publishPluginMavenPublicationToMavenRepository -PisRelease=true'
116+
executeOnShell 'rm -rf build/staging-deploy'
117+
executeOnShell './gradlew clean publish -S -x :provider:gradle:publish'
118+
executeOnShell 'jrelease publish -od build'
118119
}
119120

120121
ask('Publish Gradle plugin?: [Y]') {
121-
executeOnShell './gradlew :provider:gradle:publishPlugins -PisRelease=true'
122+
executeOnShell 'rm -rf provider/gradle/build/staging-deploy/'
123+
executeOnShell './gradlew :provider:gradle:publish'
124+
executeOnShell 'rm -rf provider/gradle/build/staging-deploy/au/com/dius/pact/au.com.dius.pact.gradle.plugin/'
125+
executeOnShell 'cd provider/gradle && jrelease publish -od build'
126+
executeOnShell './gradlew :provider:gradle:publish'
127+
executeOnShell './gradlew :provider:gradle:publishPlugins'
122128
}
123129

124130
ask('Publish pacts to pact-foundation.pactflow.io?: [Y]') {

0 commit comments

Comments
 (0)