Skip to content

Commit a77cea1

Browse files
committed
SDK regeneration
1 parent a502150 commit a77cea1

File tree

1 file changed

+51
-39
lines changed

1 file changed

+51
-39
lines changed

build.gradle

Lines changed: 51 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
plugins {
22
id 'java-library'
3+
id 'maven-publish'
34
id 'com.diffplug.spotless' version '6.11.0'
4-
id 'com.vanniktech.maven.publish' version '0.27.0'
55
}
66

77
repositories {
88
mavenCentral()
9+
maven {
10+
url 'https://s01.oss.sonatype.org/content/repositories/releases/'
11+
}
912
}
1013

1114
dependencies {
@@ -17,6 +20,7 @@ dependencies {
1720
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
1821
}
1922

23+
2024
sourceCompatibility = 1.8
2125
targetCompatibility = 1.8
2226

@@ -31,58 +35,66 @@ spotless {
3135
}
3236
}
3337

38+
39+
java {
40+
withSourcesJar()
41+
withJavadocJar()
42+
}
43+
44+
3445
group = 'com.squareup'
46+
3547
version = '45.0.0.20250618'
3648

49+
jar {
50+
dependsOn(":generatePomFileForMavenPublication")
51+
archiveBaseName = "square"
52+
}
53+
54+
sourcesJar {
55+
archiveBaseName = "square"
56+
}
57+
58+
javadocJar {
59+
archiveBaseName = "square"
60+
}
61+
3762
test {
3863
useJUnitPlatform()
3964
testLogging {
4065
showStandardStreams = true
4166
}
4267
}
4368

44-
// Configure maven publishing for Central Portal
45-
mavenPublishing {
46-
publishToMavenCentral()
47-
signAllPublications()
48-
49-
coordinates("com.squareup", "square", "$version")
50-
51-
pom {
52-
name = "Square Java SDK"
53-
description = "Official Square Java SDK"
54-
inceptionYear = "2019"
55-
url = "https://github.com/square/square-java-sdk"
56-
57-
licenses {
58-
license {
59-
name = "MIT License"
60-
url = "https://opensource.org/licenses/MIT"
61-
distribution = "repo"
69+
publishing {
70+
publications {
71+
maven(MavenPublication) {
72+
groupId = 'com.squareup'
73+
artifactId = 'square'
74+
version = '45.0.0.20250618'
75+
from components.java
76+
pom {
77+
licenses {
78+
license {
79+
name = 'MIT'
80+
}
81+
}
82+
scm {
83+
connection = 'scm:git:git://github.com/square/square-java-sdk.git'
84+
developerConnection = 'scm:git:git://github.com/square/square-java-sdk.git'
85+
url = 'https://github.com/square/square-java-sdk'
86+
}
6287
}
6388
}
64-
65-
developers {
66-
developer {
67-
id = "square"
68-
name = "Square"
69-
url = "https://github.com/square"
89+
}
90+
repositories {
91+
maven {
92+
url "$System.env.MAVEN_PUBLISH_REGISTRY_URL"
93+
credentials {
94+
username "$System.env.MAVEN_USERNAME"
95+
password "$System.env.MAVEN_PASSWORD"
7096
}
7197
}
72-
73-
scm {
74-
url = "https://github.com/square/square-java-sdk"
75-
connection = "scm:git:git://github.com/square/square-java-sdk.git"
76-
developerConnection = "scm:git:ssh://[email protected]/square/square-java-sdk.git"
77-
}
7898
}
7999
}
80100

81-
java {
82-
withSourcesJar()
83-
withJavadocJar()
84-
85-
toolchain {
86-
languageVersion = JavaLanguageVersion.of(8)
87-
}
88-
}

0 commit comments

Comments
 (0)