@@ -2,12 +2,14 @@ plugins {
2
2
id ' java-library'
3
3
id ' maven-publish'
4
4
id ' com.diffplug.spotless' version ' 6.11.0'
5
+ id ' signing'
6
+ id ' cl.franciscosolis.sonatype-central-upload' version ' 1.0.3'
5
7
}
6
8
7
9
repositories {
8
10
mavenCentral()
9
11
maven {
10
- url ' https://s01. oss.sonatype.org/content/repositories/releases /'
12
+ url ' https://oss.sonatype.org/service/local/staging/deploy/maven2 /'
11
13
}
12
14
}
13
15
44
46
45
47
group = ' io.intercom'
46
48
47
- version = ' 3.0.0-alpha4 '
49
+ version = ' 3.0.0-alpha5 '
48
50
49
51
jar {
50
52
dependsOn(" :generatePomFileForMavenPublication" )
@@ -59,6 +61,10 @@ javadocJar {
59
61
archiveBaseName = " intercom-java"
60
62
}
61
63
64
+ signing {
65
+ sign(publishing. publications)
66
+ }
67
+
62
68
test {
63
69
useJUnitPlatform()
64
70
testLogging {
@@ -71,15 +77,24 @@ publishing {
71
77
maven(MavenPublication ) {
72
78
groupId = ' io.intercom'
73
79
artifactId = ' intercom-java'
74
- version = ' 3.0.0-alpha4 '
80
+ version = ' 3.0.0-alpha5 '
75
81
from components. java
76
82
pom {
83
+ name = ' intercom'
84
+ description = ' The official SDK of intercom'
85
+ url = ' https://buildwithfern.com'
77
86
licenses {
78
87
license {
79
88
name = ' The MIT License (MIT)'
80
89
url = ' https://mit-license.org/'
81
90
}
82
91
}
92
+ developers {
93
+ developer {
94
+ name = ' intercom'
95
+
96
+ }
97
+ }
83
98
scm {
84
99
connection = ' scm:git:git://github.com/intercom/intercom-java.git'
85
100
developerConnection = ' scm:git:git://github.com/intercom/intercom-java.git'
@@ -88,14 +103,28 @@ publishing {
88
103
}
89
104
}
90
105
}
91
- repositories {
92
- maven {
93
- url " $System . env . MAVEN_PUBLISH_REGISTRY_URL "
94
- credentials {
95
- username " $System . env . MAVEN_USERNAME "
96
- password " $System . env . MAVEN_PASSWORD "
97
- }
98
- }
99
- }
100
106
}
101
107
108
+ sonatypeCentralUpload {
109
+ username = " $System . env . MAVEN_USERNAME "
110
+ password = " $System . env . MAVEN_PASSWORD "
111
+
112
+ archives = files(
113
+ " $buildDir /libs/intercom-java-" + version + " .jar" ,
114
+ " $buildDir /libs/intercom-java-" + version + " -sources.jar" ,
115
+ " $buildDir /libs/intercom-java-" + version + " -javadoc.jar"
116
+ )
117
+
118
+ pom = file(" $buildDir /publications/maven/pom-default.xml" )
119
+ signingKey = " $System . env . MAVEN_SIGNATURE_SECRET_KEY "
120
+ signingKeyPassphrase = " $System . env . MAVEN_SIGNATURE_PASSWORD "
121
+ }
122
+
123
+ signing {
124
+ def signingKeyId = " $System . env . MAVEN_SIGNATURE_SECRET_KEY "
125
+ def signingPassword = " $System . env . MAVEN_SIGNATURE_PASSWORD "
126
+ useInMemoryPgpKeys(signingKeyId, signingPassword)
127
+ sign publishing. publications. maven
128
+ }
129
+
130
+ sonatypeCentralUpload. dependsOn build
0 commit comments