Skip to content

Commit 17f122a

Browse files
authored
Merge pull request #205 from Chuhaa/master
Remove listener module
2 parents 2c25264 + 6c5bc29 commit 17f122a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+22
-2620
lines changed

.gitattributes

Lines changed: 0 additions & 6 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,35 +13,20 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v2
16-
- name: Set up JDK 11
17-
uses: actions/setup-java@v1
18-
with:
19-
java-version: 11
20-
- name: Grant execute permission for gradlew
21-
run: chmod +x gradlew
22-
- name: Build with Gradle
23-
env:
24-
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }}
25-
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }}
26-
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true
27-
run: |
28-
./gradlew build
2916
- name: Ballerina Build
3017
uses: ballerina-platform/ballerina-action/@nightly
3118
with:
3219
args:
3320
pack
3421
env:
3522
WORKING_DIR: ./gmail
36-
JAVA_HOME: /usr/lib/jvm/default-jvm
3723
- name: Ballerina Tests
3824
uses: ballerina-platform/ballerina-action/@nightly
3925
with:
4026
args:
4127
test --code-coverage
4228
env:
4329
WORKING_DIR: ./gmail
44-
JAVA_HOME: /usr/lib/jvm/default-jvm
4530
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true
4631
CLIENT_ID: ${{ secrets.CLIENT_ID }}
4732
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
@@ -69,4 +54,6 @@ jobs:
6954
# Print the code coverage information
7055
- name: Code Coverage
7156
run: |
57+
echo "Covered Code Lines : ${{fromJson(steps.test_results.outputs.testResultsJson).coveredLines}}"
58+
echo "Total Code Lines : $(expr ${{fromJson(steps.test_results.outputs.testResultsJson).missedLines}} + ${{fromJson(steps.test_results.outputs.testResultsJson).coveredLines}})"
7259
echo "Code Coverage Percentage : ${{fromJson(steps.test_results.outputs.testResultsJson).coveragePercentage}}"

.github/workflows/daily-build.yml

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,6 @@ jobs:
1717
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
1818
- uses: actions/checkout@v2
1919

20-
# Set up Java Environment
21-
- name: Set up JDK 11
22-
uses: actions/setup-java@v1
23-
with:
24-
java-version: 11
25-
26-
# Grant execute permission to the gradlew script
27-
- name: Grant execute permission for gradlew
28-
run: chmod +x gradlew
29-
30-
# Build the project with Gradle
31-
- name: Build with Gradle
32-
env:
33-
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }}
34-
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }}
35-
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true
36-
run: |
37-
./gradlew build
38-
3920
# Build the ballerina project
4021
- name: Ballerina Build
4122
uses: ballerina-platform/ballerina-action/@nightly
@@ -44,7 +25,6 @@ jobs:
4425
pack
4526
env:
4627
WORKING_DIR: ./gmail
47-
JAVA_HOME: /usr/lib/jvm/default-jvm
4828

4929
# Test the ballerina project
5030
- name: Ballerina Test
@@ -54,7 +34,6 @@ jobs:
5434
test --code-coverage
5535
env:
5636
WORKING_DIR: ./gmail
57-
JAVA_HOME: /usr/lib/jvm/default-jvm
5837
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true
5938
CLIENT_ID: ${{ secrets.CLIENT_ID }}
6039
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
@@ -82,6 +61,8 @@ jobs:
8261
# Print the code coverage information
8362
- name: Code Coverage
8463
run: |
64+
echo "Covered Code Lines : ${{fromJson(steps.test_results.outputs.testResultsJson).coveredLines}}"
65+
echo "Total Code Lines : $(expr ${{fromJson(steps.test_results.outputs.testResultsJson).missedLines}} + ${{fromJson(steps.test_results.outputs.testResultsJson).coveredLines}})"
8566
echo "Code Coverage Percentage : ${{fromJson(steps.test_results.outputs.testResultsJson).coveragePercentage}}"
8667
8768
# Send notification when build fails

.github/workflows/dev-stg-release.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ jobs:
3838
pack
3939
env:
4040
WORKING_DIR: ./gmail
41-
JAVA_HOME: /usr/lib/jvm/default-jvm
4241
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true
4342

4443
- name: Push to Dev
@@ -49,7 +48,6 @@ jobs:
4948
push
5049
env:
5150
WORKING_DIR: ./gmail
52-
JAVA_HOME: /usr/lib/jvm/default-jvm
5351
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true
5452
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_DEV_ACCESS_TOKEN }}
5553

@@ -61,6 +59,5 @@ jobs:
6159
push
6260
env:
6361
WORKING_DIR: ./gmail
64-
JAVA_HOME: /usr/lib/jvm/default-jvm
6562
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true
6663
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_STAGE_ACCESS_TOKEN }}

.github/workflows/pull-request.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,35 +9,20 @@ jobs:
99

1010
steps:
1111
- uses: actions/checkout@v2
12-
- name: Set up JDK 11
13-
uses: actions/setup-java@v1
14-
with:
15-
java-version: 11
16-
- name: Grant execute permission for gradlew
17-
run: chmod +x gradlew
18-
- name: Build with Gradle
19-
env:
20-
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }}
21-
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }}
22-
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true
23-
run: |
24-
./gradlew build
2512
- name: Ballerina Build
2613
uses: ballerina-platform/ballerina-action/@nightly
2714
with:
2815
args:
2916
pack
3017
env:
3118
WORKING_DIR: ./gmail
32-
JAVA_HOME: /usr/lib/jvm/default-jvm
3319
- name: Ballerina Test
3420
uses: ballerina-platform/ballerina-action/@nightly
3521
with:
3622
args:
3723
test
3824
env:
3925
WORKING_DIR: ./gmail
40-
JAVA_HOME: /usr/lib/jvm/default-jvm
4126
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true
4227
CLIENT_ID: ${{ secrets.CLIENT_ID }}
4328
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}

.github/workflows/release.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,13 @@ jobs:
1111

1212
steps:
1313
- uses: actions/checkout@v2
14-
- name: Set up JDK 11
15-
uses: actions/setup-java@v1
16-
with:
17-
java-version: 11
18-
- name: Grant execute permission for gradlew
19-
run: chmod +x gradlew
20-
- name: Build with Gradle
21-
env:
22-
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }}
23-
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }}
24-
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true
25-
run: |
26-
./gradlew build
2714
- name: Ballerina Build
2815
uses: ballerina-platform/ballerina-action/@master
2916
with:
3017
args:
3118
pack
3219
env:
3320
WORKING_DIR: ./gmail
34-
JAVA_HOME: /usr/lib/jvm/default-jvm
3521
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true
3622
CLIENT_ID: ${{ secrets.CLIENT_ID }}
3723
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
@@ -52,6 +38,5 @@ jobs:
5238
push
5339
env:
5440
WORKING_DIR: ./gmail
55-
JAVA_HOME: /usr/lib/jvm/default-jvm
5641
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true
5742
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_ACCESS_TOKEN }}

README.md

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@
77
[Gmail](https://blog.google/products/gmail/), short for Google Mail is a free email service developed by Google LLC. It
88
enables users to send and receive emails over the internet.
99

10-
Gmail connector connects to Gmail API via [Ballerina](https://ballerina.io/). This connector provides the capability to programatically handle Gmail related operations and watch for changes in the Gmail mailbox.
10+
Gmail connector connects to Gmail API via [Ballerina](https://ballerina.io/). This connector provides the capability to programatically handle Gmail related operations.
1111

1212
For more information, go to the module(s).
1313

1414
- [`googleapis.gmail`](gmail/Module.md)
15-
- [`googleapis.gmail.listener`](gmail/modules/listener/Module.md)
16-
1715

1816
## Building from the source
1917

@@ -25,33 +23,20 @@ For more information, go to the module(s).
2523
2624
2. Download and install [Ballerina Swan Lake](https://ballerina.io/)
2725

28-
3. Download and install Gradle.
29-
30-
4. Export Github Personal access token with read package permissions as follows,
31-
32-
```
33-
export packageUser=<Username>
34-
export packagePAT=<Personal access token>
35-
```
36-
3726
### Building the source
3827

3928
Execute the commands below to build from the source.
4029

41-
1. To build Java dependency
42-
```
43-
./gradlew clean build
44-
```
4530

46-
2. - To build the package:
47-
```shell script
48-
bal pack ./gmail
49-
```
31+
- To build the package:
32+
```shell script
33+
bal build ./gmail
34+
```
5035

51-
- To test the package:
52-
```shell script
53-
bal test ./gmail
54-
```
36+
- To test the package:
37+
```shell script
38+
bal test ./gmail
39+
```
5540

5641
## Contributing to Ballerina
5742

build.gradle

Lines changed: 0 additions & 122 deletions
This file was deleted.

docs/images/send_mail.gif

-141 KB
Binary file not shown.

gmail/Ballerina.toml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
[package]
2-
distribution = "2201.0.0"
2+
distribution = "2201.0.3"
33
org = "ballerinax"
44
name = "googleapis.gmail"
5-
version = "2.2.1"
6-
export= ["googleapis.gmail", "googleapis.gmail.listener"]
5+
version = "3.0.0"
76
authors = ["Ballerina"]
87
repository = "https://github.com/ballerina-platform/module-ballerinax-googleapis.gmail"
98
keywords = ["Communication/Email", "Cost/Free", "Vendor/Google"]
@@ -12,9 +11,3 @@ license = ["Apache-2.0"]
1211

1312
[build-options]
1413
observabilityIncluded = true
15-
16-
[[platform.java11.dependency]]
17-
path = "../java-wrapper/build/libs/java-wrapper-2.2.1.jar"
18-
groupId = "org.ballerinalang.googleapis.gmail"
19-
artifactId = "java-wrapper"
20-
version = "2.2.1"

0 commit comments

Comments
 (0)