Skip to content

Commit fa7e3d0

Browse files
feat: add java formatter
1 parent 0ecb630 commit fa7e3d0

23 files changed

Lines changed: 531 additions & 513 deletions
Lines changed: 28 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,35 @@
1-
name: Publish package to the Maven Central Repository
2-
3-
on:
1+
---
2+
name: "Publish package to the Maven Central Repository"
3+
"on":
44
release:
5-
types: [created]
6-
5+
types:
6+
- "created"
77
jobs:
88
build:
9-
10-
runs-on: ubuntu-latest
9+
runs-on: "ubuntu-latest"
1110
permissions:
12-
contents: read
13-
packages: write
14-
11+
contents: "read"
12+
packages: "write"
1513
steps:
16-
- uses: actions/checkout@v4
17-
- name: Set up Maven Central Repository
18-
uses: actions/setup-java@v4
14+
- uses: "actions/checkout@v4"
15+
- name: "Set up Maven Central Repository"
16+
uses: "actions/setup-java@v4"
1917
with:
20-
java-version: '23'
21-
distribution: 'temurin'
22-
server-id: central
23-
server-username: MAVEN_USERNAME
24-
server-password: MAVEN_PASSWORD
25-
gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }}
26-
gpg-passphrase: MAVEN_GPG_PASSPHRASE
27-
28-
- name: Set version
29-
run: mvn versions:set -DnewVersion=${{ github.event.release.tag_name }}
30-
31-
- name: Build with Maven
32-
run: mvn -B package --file pom.xml
33-
34-
- name: Publish package
35-
run: mvn -P release --batch-mode deploy -DskipTests
36-
18+
java-version: "23"
19+
distribution: "temurin"
20+
server-id: "central"
21+
server-username: "CENTRAL_TOKEN_USERNAME"
22+
server-password: "CENTRAL_TOKEN_PASSWORD"
23+
gpg-private-key: "GPG_SIGNING_KEY"
24+
gpg-passphrase: "GPG_SIGNING_KEY_PASSWORD"
25+
- name: "Set version"
26+
run: "mvn versions:set -DnewVersion=${{ github.event.release.tag_name }}"
27+
- name: "Build with Maven"
28+
run: "mvn -B package --file pom.xml"
29+
- name: "Publish package"
30+
run: "mvn -P release --batch-mode deploy -DskipTests"
3731
env:
38-
MAVEN_USERNAME: ${{ secrets.CENTRAL_TOKEN_USERNAME }}
39-
MAVEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN_PASSWORD }}
40-
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_SIGNING_KEY_PASSWORD }}
32+
CENTRAL_TOKEN_USERNAME: "${{ secrets.CENTRAL_TOKEN_USERNAME }}"
33+
CENTRAL_TOKEN_PASSWORD: "${{ secrets.CENTRAL_TOKEN_PASSWORD }}"
34+
GPG_SIGNING_KEY: "${{ secrets.GPG_SIGNING_KEY }}"
35+
GPG_SIGNING_KEY_PASSWORD: "${{ secrets.GPG_SIGNING_KEY_PASSWORD }}"

.github/workflows/maven.yml

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,22 @@
1-
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
3-
4-
# This workflow uses actions that are not certified by GitHub.
5-
# They are provided by a third-party and are governed by
6-
# separate terms of service, privacy policy, and support
7-
# documentation.
8-
9-
name: Java CI with Maven
10-
11-
on:
1+
---
2+
name: "Java CI with Maven"
3+
"on":
124
push:
13-
branches: [ "main" ]
5+
branches:
6+
- "main"
147
pull_request:
15-
branches: [ "main" ]
16-
8+
branches:
9+
- "main"
1710
jobs:
1811
build:
19-
20-
runs-on: ubuntu-latest
21-
12+
runs-on: "ubuntu-latest"
2213
steps:
23-
- uses: actions/checkout@v4
24-
- name: Set up JDK 23
25-
uses: actions/setup-java@v4
14+
- uses: "actions/checkout@v4"
15+
- name: "Set up JDK 23"
16+
uses: "actions/setup-java@v4"
2617
with:
27-
java-version: '23'
28-
distribution: 'temurin'
29-
cache: maven
30-
- name: Build with Maven
31-
run: mvn -B package --file pom.xml
32-
18+
java-version: "23"
19+
distribution: "temurin"
20+
cache: "maven"
21+
- name: "Build with Maven"
22+
run: "mvn -B package --file pom.xml"

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ build/
3636
.vscode/
3737

3838
### Mac OS ###
39-
.DS_Store
39+
.DS_Store

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# ReSMS SDK for Java
2+
23
Java SDK for ReSMS, a simple and powerful SMS API.
34

45
## Installation
@@ -12,6 +13,7 @@ Java SDK for ReSMS, a simple and powerful SMS API.
1213
```
1314

1415
## Setup
16+
1517
You need to get an API key on [ReSMS Dashboard](https://resms.dev/dashboard).
1618
Then import the package and create a new instance of the `ReSMS` class with your API key.
1719

@@ -24,7 +26,9 @@ ReSMS smsWithCustomTimeout = new ReSMS("your_api_key_here", 30);
2426
```
2527

2628
## Usage
29+
2730
Send you can send your SMS:
31+
2832
```java
2933
public class SmsExample {
3034
public static void main(String[] args) {
@@ -51,6 +55,7 @@ public class SmsExample {
5155
```
5256

5357
## Error Handling
58+
5459
The SDK throws different types of exceptions:
5560

5661
```ReSMSException```: Thrown when the API returns a non-2xx response.
@@ -60,10 +65,13 @@ The SDK throws different types of exceptions:
6065
```InterruptedException```: Thrown if the HTTP request is interrupted.
6166

6267
## Documentationc
68+
6369
The full documentation is available at [dev.resms.dev/docs](https://resms.dev/docs).
6470

6571
## License
72+
6673
This project is licensed under the MIT License.
6774

6875
## Note
76+
6977
This is a simple SDK for ReSMS. More features and improvements will be added in the future. If you have any suggestions or issues, please open an issue on GitHub.

0 commit comments

Comments
 (0)