@@ -4,6 +4,7 @@ plugins {
4
4
id ' java-library'
5
5
id ' java-library-distribution'
6
6
id ' maven-publish'
7
+ id ' org.jreleaser' version ' 1.12.0'
7
8
id " com.google.protobuf" version " 0.9.4"
8
9
9
10
}
@@ -103,6 +104,9 @@ java {
103
104
publishing {
104
105
publications {
105
106
contractcase(MavenPublication ) {
107
+ groupId = ' io.contract-testing.contractcase'
108
+ artifactId = ' contract-case'
109
+ version = version
106
110
from components. java
107
111
versionMapping {
108
112
usage(' java-api' ) {
@@ -112,16 +116,35 @@ publishing {
112
116
fromResolutionResult()
113
117
}
114
118
}
119
+
120
+ pom {
121
+ name = ' contract-case'
122
+ description = ' ContractCase Java DSL'
123
+ url = ' https://case.contract-testing.io/'
124
+ inceptionYear = ' 2022'
125
+ licenses {
126
+ license {
127
+ name = ' BSD-3-Clause'
128
+ url = ' https://spdx.org/licenses/BSD-3-Clause.html'
129
+ }
130
+ }
131
+ developers {
132
+ developer {
133
+ id = ' TimothyJones'
134
+ name = ' Timothy Jones'
135
+ }
136
+ }
137
+ scm {
138
+ connection = ' scm:git:https://github.com/case-contract-testing/java-dsl.git'
139
+ developerConnection = ' scm:git:ssh://github.com/case-contract-testing/java-dsl.git'
140
+ url = ' https://github.com/case-contract-testing/java-dsl'
141
+ }
142
+ }
115
143
}
116
144
}
117
145
repositories {
118
146
maven {
119
- name = " OSSRH"
120
- url = " https://oss.sonatype.org/service/local/staging/deploy/maven2/"
121
- credentials {
122
- username = System . getenv(" MAVEN_USERNAME" )
123
- password = System . getenv(" MAVEN_PASSWORD" )
124
- }
147
+ url = layout. buildDirectory. dir(' staging-deploy' )
125
148
}
126
149
mavenLocal()
127
150
}
@@ -137,4 +160,29 @@ publishing {
137
160
}
138
161
}
139
162
}*/
163
+ }
164
+
165
+ jreleaser {
166
+ signing {
167
+ active = ' ALWAYS'
168
+ armored = true
169
+ }
170
+ deploy {
171
+ maven {
172
+ nexus2 {
173
+ ' maven-central' {
174
+ active = ' ALWAYS'
175
+ url = ' https://s01.oss.sonatype.org/service/local'
176
+ snapshotUrl = ' https://s01.oss.sonatype.org/content/repositories/snapshots/'
177
+ closeRepository = true
178
+ releaseRepository = true
179
+ username = System . getenv(" MAVEN_USERNAME" )
180
+ password = System . getenv(" MAVEN_PASSWORD" )
181
+ applyMavenCentralRules = true
182
+
183
+ stagingRepository(' build/staging-deploy' )
184
+ }
185
+ }
186
+ }
187
+ }
140
188
}
0 commit comments