@@ -32,6 +32,7 @@ buildscript {
32
32
33
33
plugins {
34
34
id(" net.ltgt.errorprone" ) version " 0.8.1" apply false
35
+ id ' net.researchgate.release' version ' 2.8.1'
35
36
}
36
37
37
38
configure(allprojects) {
@@ -53,27 +54,13 @@ apply(from: "project.gradle");
53
54
54
55
group = " com.github.java-json-tools" ;
55
56
56
- ext. forRelease = ! version. endsWith(" -SNAPSHOT" );
57
-
58
57
/*
59
58
* Repositories to use
60
59
*/
61
60
repositories {
62
61
mavenCentral();
63
- if (! forRelease) {
64
- maven {
65
- url " https://oss.sonatype.org/content/repositories/snapshots"
66
- }
67
- }
68
- /* Allow staging references for last pre-release testing. */
69
- if (project. properties. containsKey(" sonatypeUsername" )) {
70
- maven {
71
- url " https://oss.sonatype.org/service/local/staging/deploy/maven2"
72
- credentials {
73
- username = project. properties[" sonatypeUsername" ]
74
- password = project. properties[" sonatypePassword" ]
75
- }
76
- }
62
+ maven {
63
+ url " https://pkgs.dev.azure.com/Gravity9Solutions/BT/_packaging/bt/maven/v1"
77
64
}
78
65
}
79
66
@@ -117,15 +104,6 @@ allprojects {
117
104
}
118
105
}
119
106
120
- /*
121
- * Javadoc: we need to tell where the overview.html is, it will not pick it up
122
- * automatically...
123
- */
124
-
125
- // javadoc {
126
- // options.overview = "src/main/java/overview.html";
127
- // }
128
-
129
107
task javadocJar (type : Jar , dependsOn : javadoc) {
130
108
classifier = " javadoc" ;
131
109
from javadoc. destinationDir;
@@ -142,108 +120,4 @@ wrapper {
142
120
distributionUrl = " https://services.gradle.org/distributions/gradle-${ gradleVersion} -all.zip" ;
143
121
}
144
122
145
- task pom {
146
- doLast {
147
- pom {}. writeTo(" ${ projectDir} /pom.xml" );
148
- }
149
- }
150
-
151
- /*
152
- * SIGNING
153
- */
154
-
155
- project. ext {
156
- scmUrl
= sprintf (
" [email protected] :java-json-tools/%s.git" , name);
157
- projectURL = sprintf (" https://github.com/java-json-tools/%s" , name);
158
- sonatypeStaging = " https://oss.sonatype.org/service/local/staging/deploy/maven2/" ;
159
- sonatypeSnapshots = " https://oss.sonatype.org/content/repositories/snapshots/" ;
160
- };
161
-
162
- task checkSigningRequirements {
163
- doLast {
164
- def requiredProperties = [ " sonatypeUsername" , " sonatypePassword" ];
165
- def noDice = false ;
166
- requiredProperties. each {
167
- if (project. properties[it] == null ) {
168
- noDice = true ;
169
- System . err. printf (" property \" %s\" is not defined!\n " , it);
170
- }
171
- }
172
- if (noDice)
173
- throw new IllegalStateException (" missing required properties for " +
174
- " upload" );
175
- }
176
- }
177
-
178
- uploadArchives {
179
- dependsOn(checkSigningRequirements);
180
- repositories {
181
- mavenDeployer {
182
- beforeDeployment {
183
- MavenDeployment deployment -> signing. signPom(deployment);
184
- }
185
-
186
- repository(url : " ${ sonatypeStaging} " ) {
187
- authentication(
188
- userName : project. properties[" sonatypeUsername" ],
189
- password : project. properties[" sonatypePassword" ]
190
- );
191
- }
192
-
193
- snapshotRepository(url : " ${ sonatypeSnapshots} " ) {
194
- authentication(
195
- userName : project. properties[" sonatypeUsername" ],
196
- password : project. properties[" sonatypePassword" ]
197
- );
198
- }
199
- }
200
- }
201
- }
202
-
203
- /*
204
- * Configure pom.xml on install, uploadArchives
205
- */
206
- [
207
- install. repositories. mavenInstaller,
208
- uploadArchives. repositories. mavenDeployer
209
- ]* . pom* . whenConfigured { pom ->
210
- pom. project {
211
- name " ${ project.name} " ;
212
- packaging " jar" ;
213
- description " ${ project.ext.description} " ;
214
- url " ${ projectURL} " ;
215
-
216
- scm {
217
- url " ${ scmUrl} " ;
218
- connection " ${ scmUrl} " ;
219
- developerConnection " scm:git:${ scmUrl} " ;
220
- }
221
-
222
- licenses {
223
- license {
224
- name " Lesser General Public License, version 3 or greater" ;
225
- url " http://www.gnu.org/licenses/lgpl.html" ;
226
- distribution " repo" ;
227
- };
228
- license {
229
- name " Apache Software License, version 2.0" ;
230
- url " http://www.apache.org/licenses/LICENSE-2.0" ;
231
- distribution " repo" ;
232
- }
233
- }
234
-
235
- developers {
236
- developer {
237
- id " huggsboson" ;
238
- name " John Huffaker" ;
239
-
240
- }
241
- }
242
- }
243
- }
244
-
245
- signing {
246
- required { forRelease && gradle. taskGraph. hasTask(" uploadArchives" ) };
247
- sign configurations. archives;
248
- }
249
123
0 commit comments