|
1 | 1 | plugins { |
2 | 2 | id 'java-library' |
3 | 3 | id 'maven-publish' |
| 4 | + id 'signing' |
4 | 5 | id 'com.diffplug.spotless' version '6.25.0' |
5 | 6 | id 'io.freefair.lombok' version '9.0.0-rc2' |
| 7 | + id 'com.vanniktech.maven.publish' version '0.28.0' |
6 | 8 | id 'idea' |
7 | 9 | id 'eclipse' |
8 | 10 | } |
@@ -224,32 +226,51 @@ jar { |
224 | 226 | } |
225 | 227 | } |
226 | 228 |
|
227 | | -publishing { |
228 | | - publications { |
229 | | - maven(MavenPublication) { |
230 | | - from components.java |
231 | | - |
232 | | - pom { |
233 | | - name = 'Braintrust Java SDK' |
234 | | - description = 'OpenTelemetry-based Braintrust SDK for Java' |
235 | | - url = 'https://github.com/braintrustdata/braintrust-x-java' |
236 | | - |
237 | | - licenses { |
238 | | - license { |
239 | | - name = 'MIT License' |
240 | | - url = 'https://opensource.org/licenses/MIT' |
241 | | - } |
242 | | - } |
243 | | - |
244 | | - developers { |
245 | | - developer { |
246 | | - id = 'braintrust' |
247 | | - name = 'Braintrust Team' |
248 | | - email = 'support@braintrust.dev' |
249 | | - } |
250 | | - } |
| 229 | +import com.vanniktech.maven.publish.JavadocJar |
| 230 | +import com.vanniktech.maven.publish.JavaLibrary |
| 231 | +import com.vanniktech.maven.publish.SonatypeHost |
| 232 | + |
| 233 | +ext["signingInMemoryKey"] = System.getenv("GPG_SIGNING_KEY") |
| 234 | +ext["signingInMemoryKeyId"] = System.getenv("GPG_SIGNING_KEY_ID") |
| 235 | +ext["signingInMemoryKeyPassword"] = System.getenv("GPG_SIGNING_PASSWORD") |
| 236 | + |
| 237 | +mavenPublishing { |
| 238 | + signAllPublications() |
| 239 | + publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL) |
| 240 | + |
| 241 | + coordinates(group.toString(), 'braintrust-sdk-java', version.toString()) |
| 242 | + configure( |
| 243 | + new JavaLibrary( |
| 244 | + new JavadocJar.Javadoc(), |
| 245 | + true |
| 246 | + ) |
| 247 | + ) |
| 248 | + |
| 249 | + pom { |
| 250 | + name = 'Braintrust Java SDK' |
| 251 | + description = 'Braintrust SDK for logs and evals in Java' |
| 252 | + url = 'https://github.com/braintrustdata/braintrust-sdk-java' |
| 253 | + |
| 254 | + licenses { |
| 255 | + license { |
| 256 | + name = 'MIT License' |
| 257 | + url = 'https://opensource.org/licenses/MIT' |
251 | 258 | } |
252 | 259 | } |
| 260 | + |
| 261 | + developers { |
| 262 | + developer { |
| 263 | + id = 'braintrust' |
| 264 | + name = 'Braintrust Team' |
| 265 | + email = 'info@braintrust.dev' |
| 266 | + } |
| 267 | + } |
| 268 | + |
| 269 | + scm { |
| 270 | + connection = 'scm:git:git://github.com/braintrustdata/braintrust-sdk-java.git' |
| 271 | + developerConnection = 'scm:git:git://github.com/braintrustdata/braintrust-sdk-java.git' |
| 272 | + url = 'https://github.com/braintrustdata/braintrust-sdk-java' |
| 273 | + } |
253 | 274 | } |
254 | 275 | } |
255 | 276 |
|
|
0 commit comments