Skip to content

Commit

Permalink
Merge pull request #119 from Chuhaa/main
Browse files Browse the repository at this point in the history
Remove listener module
  • Loading branch information
LakshanSS authored May 23, 2022
2 parents acfec3a + f6831b8 commit 9d2baa9
Show file tree
Hide file tree
Showing 37 changed files with 10 additions and 1,584 deletions.
19 changes: 2 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
env:
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }}
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }}
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true
run: |
./gradlew build
- name: Ballerina Build
uses: ballerina-platform/ballerina-action/@nightly
with:
args: pack
env:
WORKING_DIR: ./calendar
JAVA_HOME: /usr/lib/jvm/default-jvm
- name: Ballerina Test
uses: ballerina-platform/ballerina-action/@nightly
with:
args: test --code-coverage
env:
WORKING_DIR: ./calendar
JAVA_HOME: /usr/lib/jvm/default-jvm
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}
REFRESH_URL: ${{ secrets.REFRESH_URL }}
ADDRESS: ${{ secrets.ADDRESS }}

# Read the ballerina test results
- name: Read Ballerina Test Results
id: test_results
Expand All @@ -53,4 +36,6 @@ jobs:
# Print the code coverage information
- name: Code Coverage
run: |
echo "Covered Lines : ${{fromJson(steps.test_results.outputs.testResultsJson).coveredLines}}"
echo "Total Code Lines : $(expr ${{fromJson(steps.test_results.outputs.testResultsJson).missedLines}} + ${{fromJson(steps.test_results.outputs.testResultsJson).coveredLines}})"
echo "Code Coverage Percentage : ${{fromJson(steps.test_results.outputs.testResultsJson).coveragePercentage}}"
24 changes: 2 additions & 22 deletions .github/workflows/daily-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,6 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Set up Java Environment
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

# Grant execute permission to the gradlew script
- name: Grant execute permission for gradlew
run: chmod +x gradlew

# Build the project with Gradle
- name: Build with Gradle
env:
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }}
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }}
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true
run: |
./gradlew build
# Build the ballerina project
- name: Ballerina Build
uses: ballerina-platform/ballerina-action/@nightly
Expand All @@ -44,7 +25,6 @@ jobs:
pack
env:
WORKING_DIR: ./calendar
JAVA_HOME: /usr/lib/jvm/default-jvm

# Test the ballerina project
- name: Ballerina Build
Expand All @@ -54,12 +34,10 @@ jobs:
test --code-coverage
env:
WORKING_DIR: ./calendar
JAVA_HOME: /usr/lib/jvm/default-jvm
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}
REFRESH_URL: ${{ secrets.REFRESH_URL }}
ADDRESS: ${{ secrets.ADDRESS }}

# Read the ballerina test results
- name: Read Ballerina Test Results
Expand All @@ -74,6 +52,8 @@ jobs:
# Print the code coverage information
- name: Code Coverage
run: |
echo "Covered Lines : ${{fromJson(steps.test_results.outputs.testResultsJson).coveredLines}}"
echo "Total Code Lines : $(expr ${{fromJson(steps.test_results.outputs.testResultsJson).missedLines}} + ${{fromJson(steps.test_results.outputs.testResultsJson).coveredLines}})"
echo "Code Coverage Percentage : ${{fromJson(steps.test_results.outputs.testResultsJson).coveragePercentage}}"
# Send notification when build fails
Expand Down
15 changes: 0 additions & 15 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
env:
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }}
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }}
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true
run: |
./gradlew build
- name: Ballerina Build
uses: ballerina-platform/ballerina-action/@nightly
with:
args: pack
env:
WORKING_DIR: ./calendar
JAVA_HOME: /usr/lib/jvm/default-jvm
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}
REFRESH_URL: ${{ secrets.REFRESH_URL }}
ADDRESS: ${{ secrets.ADDRESS }}
16 changes: 0 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
env:
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }}
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }}
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true
run: |
./gradlew build
- name: Ballerina Build
uses: ballerina-platform/ballerina-action/@master
with:
args: pack
env:
WORKING_DIR: ./calendar
JAVA_HOME: /usr/lib/jvm/default-jvm
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}
REFRESH_URL: ${{ secrets.REFRESH_URL }}
ADDRESS: ${{ secrets.ADDRESS }}
- name: Ballerina Push
uses: ballerina-platform/ballerina-action/@master
with:
args: push
env:
WORKING_DIR: ./calendar
JAVA_HOME: /usr/lib/jvm/default-jvm
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_ACCESS_TOKEN }}
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ Ballerina Google Calendar Connector

[Google Calendar](https://developers.google.com/calendar) is a time-management and scheduling calendar service developed by Google. It lets users to organize their schedule and share events with others.

This connector provides the capability to programmatically manage events and calendars and listen to the events occurred in the calendar.
This connector provides the capability to programmatically manage events and calendars.
For more information about configuration and operations, go to the module.
- [googleapis.calendar](calendar/Module.md) - Perform Google Calendar related operations programmatically
- [googleapis.calendar.listener](calendar/modules/listener/Module.md) - Listen for Google Calendar events and process them.

## Building from the source
### Setting up the prerequisites
Expand All @@ -25,11 +24,7 @@ For more information about configuration and operations, go to the module.

Execute the commands below to build from the source.

1. To build Java dependency
```
./gradlew build
```
2. * To build the package:
1. * To build the package:
```
bal pack ./calendar
```
Expand Down
111 changes: 0 additions & 111 deletions build.gradle

This file was deleted.

9 changes: 1 addition & 8 deletions calendar/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,9 @@
distribution = "2201.0.0"
org= "ballerinax"
name= "googleapis.calendar"
version= "2.2.0"
export= ["googleapis.calendar", "googleapis.calendar.listener"]
version= "3.0.0"
license= ["Apache-2.0"]
authors = ["Ballerina"]
keywords = ["Productivity/Calendars", "Cost/Free", "Vendor/Google"]
icon = "icon.png"
repository = "https://github.com/ballerina-platform/module-ballerinax-googleapis.calendar"

[[platform.java11.dependency]]
path = "../java-wrapper/build/libs/java-wrapper-2.2.0.jar"
groupId = "org.ballerinalang.googleapis.calendar"
artifactId = "java-wrapper"
version = "2.2.0"
34 changes: 3 additions & 31 deletions calendar/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@ dependencies = [
org = "ballerina"
name = "jballerina.java"
version = "0.0.0"
modules = [
{org = "ballerina", packageName = "jballerina.java", moduleName = "jballerina.java"}
]

[[package]]
org = "ballerina"
Expand Down Expand Up @@ -161,9 +158,6 @@ version = "0.0.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]
modules = [
{org = "ballerina", packageName = "lang.runtime", moduleName = "lang.runtime"}
]

[[package]]
org = "ballerina"
Expand Down Expand Up @@ -252,9 +246,6 @@ dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "time"}
]
modules = [
{org = "ballerina", packageName = "task", moduleName = "task"}
]

[[package]]
org = "ballerina"
Expand Down Expand Up @@ -290,40 +281,21 @@ modules = [
{org = "ballerina", packageName = "url", moduleName = "url"}
]

[[package]]
org = "ballerina"
name = "uuid"
version = "1.2.0"
dependencies = [
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.int"},
{org = "ballerina", name = "regex"}
]
modules = [
{org = "ballerina", packageName = "uuid", moduleName = "uuid"}
]

[[package]]
org = "ballerinax"
name = "googleapis.calendar"
version = "2.2.0"
version = "3.0.0"
dependencies = [
{org = "ballerina", name = "http"},
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "jwt"},
{org = "ballerina", name = "lang.runtime"},
{org = "ballerina", name = "log"},
{org = "ballerina", name = "os"},
{org = "ballerina", name = "task"},
{org = "ballerina", name = "test"},
{org = "ballerina", name = "time"},
{org = "ballerina", name = "url"},
{org = "ballerina", name = "uuid"}
{org = "ballerina", name = "url"}
]
modules = [
{org = "ballerinax", packageName = "googleapis.calendar", moduleName = "googleapis.calendar"},
{org = "ballerinax", packageName = "googleapis.calendar", moduleName = "googleapis.calendar.listener"}
{org = "ballerinax", packageName = "googleapis.calendar", moduleName = "googleapis.calendar"}
]


Loading

0 comments on commit 9d2baa9

Please sign in to comment.