@@ -8,25 +8,26 @@ buildscript {
88 }
99 }
1010 mavenCentral()
11+ maven {
12+ url " https://plugins.gradle.org/m2/"
13+ }
1114 }
1215 dependencies {
1316 classpath(" org.springframework.boot:spring-boot-gradle-plugin:${ springBootVersion} " )
14- classpath(" io.github .gradle-nexus:publish-plugin :1.0 .0" )
17+ classpath(" ca.cutterslade .gradle:gradle-dependency-analyze :1.9 .0" )
1518 }
1619}
1720
1821plugins {
19- id ' org.springframework.boot'
20- id ' io.spring.dependency-management'
21- id ' maven-publish '
22- // id "io.github.gradle-nexus. publish-plugin" version "1.0.0"
22+ id ' org.springframework.boot' version " ${ springBootVersion } "
23+ id ' io.spring.dependency-management' version ' 1.0.11.RELEASE '
24+ // id 'org.springframework.boot '
25+ // id 'maven- publish'
2326 id ' groovy'
2427 // id "ca.cutterslade.analyze"
2528}
2629
27- apply plugin : " maven-publish"
28- apply plugin : ' signing'
29- // apply plugin: 'io.github.gradle-nexus.publish-plugin'
30+
3031apply plugin : ' groovy'
3132apply plugin : ' io.spring.dependency-management'
3233
@@ -42,13 +43,7 @@ archivesBaseName = "spring-boot-starter-beapi"
4243version = " ${ version} "
4344sourceCompatibility = " ${ sourceCompatibility} "
4445
45- publishing {
46- publications {
47- maven(MavenPublication ) {
48- from(components. java)
49- }
50- }
51- }
46+
5247
5348java {
5449 withJavadocJar()
@@ -106,10 +101,11 @@ dependencies {
106101 implementation(' org.apache.groovy:groovy-json:4.0.8' ){
107102 exclude group :' org.apache.groovy' , module : ' groovy-all'
108103 }
109- // implementation('org.codehaus.gpars:gpars:1.2.1'){
110- // exclude group:'org.multiverse', module:'multiverse-core'
111- // exclude group:'org.codehaus.groovy', module: 'groovy-all'
112- // }
104+
105+ implementation(' org.codehaus.gpars:gpars:1.2.1' ){
106+ exclude group :' org.multiverse' , module :' multiverse-core'
107+ exclude group :' org.codehaus.groovy' , module : ' groovy-all'
108+ }
113109
114110
115111 // [APACHE LIBS]
@@ -166,53 +162,6 @@ jar {
166162}
167163
168164
169- project. plugins. withType(MavenPublishPlugin ). all {
170- PublishingExtension publishing = project. extensions. getByType(PublishingExtension )
171- publishing. publications. withType(MavenPublication ). all { mavenPublication ->
172- mavenPublication. pom {
173- name = " ${ project.group} :${ project.name} "
174- description = " The Beapi Springboot Starter for API Automation; automates and simplifies almost all API functionality and security"
175- url = " https://github.com/orubel/spring-boot-starter-beapi"
176- licenses {
177- license {
178- name = " Reciprocal Public License (RPL-1.5)"
179- url = " https://opensource.org/licenses/RPL-1.5"
180- }
181- }
182- developers {
183- developer {
184- id = " orubel"
185- name = " Owen Rubel"
186- email = " orubel+spam@gmail.com"
187- }
188- }
189- scm {
190- connection = " https://github.com/orubel/spring-boot-starter-beapi.git"
191- developerConnection = " https://github.com/orubel/spring-boot-starter-beapi.git"
192- url = " https://github.com/orubel/spring-boot-starter-beapi"
193- }
194- }
195- }
196- }
197-
198- nexusPublishing {
199- repositories {
200- sonatype {
201- username = System . getenv(" ORG_GRADLE_PROJECT_ossrhUsername" )
202- password = System . getenv(" ORG_GRADLE_PROJECT_ossrhPassword" )
203- nexusUrl. set(uri(" https://s01.oss.sonatype.org/service/local/" ))
204- snapshotRepositoryUrl. set(uri(" https://s01.oss.sonatype.org/content/repositories/snapshots/" ))
205- }
206- }
207-
208- // these are not strictly required. The default timeouts are set to 1 minute. But Sonatype can be really slow.
209- // If you get the error "java.net.SocketTimeoutException: timeout", these lines will help.
210- connectTimeout = Duration . ofMinutes(3 )
211- clientTimeout = Duration . ofMinutes(3 )
212- }
213-
214-
215-
216165tasks. register(' copy' , Copy ) {
217166 from jar
218167 from(' src/main/groovy/io/beapi/api/cli/Beapi.groovy' ) {
@@ -226,38 +175,6 @@ task firstCopy(type: Copy) {
226175 }
227176}
228177
229- publishing {
230- repositories {
231- maven {
232- name = " local"
233- // change URLs to point to your repos, e.g. http://my.org/repo
234- def releasesRepoUrl = " $buildDir /repos/releases"
235- def snapshotsRepoUrl = " $buildDir /repos/snapshots"
236- url = version. endsWith(" SNAPSHOT" ) ? snapshotsRepoUrl : releasesRepoUrl
237- }
238- }
239- }
240-
241- def hasSigningKey = findProperty(" signing.keyId" ) || findProperty(" signing.key" )
242- if (hasSigningKey) {
243- sign(project)
244- }
245-
246- void sign (Project project ) {
247- project. signing {
248- required { project. gradle. taskGraph. hasTask(" publish" ) }
249- def signingKeyId = findProperty(" signing.keyId" )
250- def signingKey = findProperty(" signing.key" )
251- def signingPassword = findProperty(" signing.password" )
252-
253- if (signingKeyId) {
254- useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
255- } else if (signingKey) {
256- useInMemoryPgpKeys(signingKey, signingPassword)
257- }
258- sign publishing. publications. maven
259- }
260- }
261178
262179defaultTasks = [' myExec' ]
263180
0 commit comments