Skip to content

Commit e1a786f

Browse files
committed
New way to publish Java SDK
1 parent f4cc5d5 commit e1a786f

2 files changed

Lines changed: 26 additions & 7 deletions

File tree

build.gradle

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,16 @@ publishing {
6464
}
6565
}
6666
repositories {
67+
// maven {
68+
// url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
69+
// credentials {
70+
// username = ossrhUsername
71+
// password = ossrhPassword
72+
// }
73+
// }
6774
maven {
68-
url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
69-
credentials {
70-
username = ossrhUsername
71-
password = ossrhPassword
72-
}
75+
name = 'LocalStaging'
76+
url = uri("$buildDir/staging-deploy")
7377
}
7478
}
7579
}

dev-notes.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ Test a specific test case:
1212

1313
## Auto generate models
1414

15-
All the files inside `src/main/java/com/ringcentral/definitions/` and `src/main/java/com/ringcentral/paths/` are
16-
auto-generated.
15+
All the files inside `src/main/java/com/ringcentral/definitions/` and
16+
`src/main/java/com/ringcentral/paths/` are auto-generated.
1717

1818
The generated code is formatted by IntelliJ IDEA.
1919

@@ -28,3 +28,18 @@ Update version numbers in `build.gradle`.
2828
Go to https://s01.oss.sonatype.org/#stagingRepositories
2929

3030
Login, "Close" and "Release" the SDK.
31+
32+
## New way to release a new version
33+
34+
Update version numbers in `build.gradle`.
35+
36+
```
37+
rm -rf ./build/staging-deploy
38+
./gradlew publish
39+
cd ./build/staging-deploy
40+
zip -r bundle.zip com/
41+
```
42+
43+
Upload bundle.zip to https://central.sonatype.com/publishing
44+
45+
After validation, don't forget to click the "Publish" button.

0 commit comments

Comments
 (0)