@@ -4,10 +4,10 @@ plugins {
4
4
id ' de.undercouch.download' version ' 5.5.0'
5
5
id ' java'
6
6
id ' java-library'
7
- id ' maven-publish'
8
7
id ' signing'
9
8
id " com.google.protobuf" version " 0.9.4"
10
- id " io.github.gradle-nexus.publish-plugin" version " 1.3.0" apply(false )
9
+ id " io.github.gradle-nexus.publish-plugin" version " 1.3.0"
10
+ id " com.vanniktech.maven.publish" version " 0.30.0"
11
11
}
12
12
13
13
if (project == rootProject) {
@@ -33,41 +33,38 @@ group = "com.devcycle"
33
33
archivesBaseName = " java-server-sdk"
34
34
version = " 2.4.0"
35
35
36
- publishing {
37
- publications {
38
- mavenJava(MavenPublication ) {
39
- from(components. java)
40
-
41
- pom {
42
- name = ' DevCycle Java Server SDK'
43
- packaging = ' jar'
44
- artifactId = ' java-server-sdk'
45
- description = ' Server side SDK to interact with DevCycle.'
46
- url = ' https://devcycle.com'
47
-
48
- scm {
49
- connection = ' scm:git:git://github.com/DevCycleHQ/java-server-sdk.git'
50
- developerConnection = ' scm:git:ssh://github.com:DevCycleHQ/java-server-sdk.git'
51
- url = ' https://github.com/DevCycleHQ/java-server-sdk'
52
- }
53
-
54
- licenses {
55
- license {
56
- name = ' MIT License'
57
- url = ' https://www.opensource.org/licenses/mit-license.php'
58
- }
59
- }
60
-
61
- developers {
62
- developer {
63
- id = ' devcycle'
64
- name = ' DevCycle Engineering'
65
- email = ' support@devcycle.com'
66
- organization = ' DevCycle'
67
- }
68
- }
36
+ mavenPublishing {
37
+ coordinates(" com.devcycle" , " java-server-sdk" , version)
38
+ publishToMavenCentral(SonatypeHost . CENTRAL_PORTAL , true )
39
+ signAllPublications()
40
+
41
+
42
+ pom {
43
+ name = ' DevCycle Java Server SDK'
44
+ description = ' Server side SDK to interact with DevCycle.'
45
+ url = ' https://devcycle.com'
46
+
47
+ licenses {
48
+ license {
49
+ name = ' MIT License'
50
+ url = ' https://www.opensource.org/licenses/mit-license.php'
69
51
}
70
52
}
53
+
54
+ developers {
55
+ developer {
56
+ id = ' devcycle'
57
+ name = ' DevCycle Engineering'
58
+ email = ' support@devcycle.com'
59
+ organization = ' DevCycle'
60
+ }
61
+ }
62
+
63
+ scm {
64
+ connection = ' scm:git:git://github.com/DevCycleHQ/java-server-sdk.git'
65
+ developerConnection = ' scm:git:ssh://github.com:DevCycleHQ/java-server-sdk.git'
66
+ url = ' https://github.com/DevCycleHQ/java-server-sdk'
67
+ }
71
68
}
72
69
}
73
70
@@ -89,20 +86,6 @@ def base64Decode(encodedString){
89
86
}
90
87
return null ;
91
88
}
92
- if (project == rootProject) {
93
- nexusPublishing {
94
- // Utilizes the Gradle Nexus Publish Plugin: https://github.com/gradle-nexus/publish-plugin/
95
- // to publish, close and release repositories to Sonatype
96
- repositories {
97
- sonatype {
98
- nexusUrl. set(uri(" https://s01.oss.sonatype.org/service/local/" ))
99
- snapshotRepositoryUrl. set(uri(" https://s01.oss.sonatype.org/content/repositories/snapshots/" ))
100
- username = findProperty(" sonatypeUsername" )
101
- password = findProperty(" sonatypePassword" )
102
- }
103
- }
104
- }
105
- }
106
89
107
90
repositories {
108
91
mavenCentral()
0 commit comments