From 2440a4b78fc96e2de54434dddfd590a00e44d05e Mon Sep 17 00:00:00 2001 From: Kalaiyarasiganeshalingam Date: Tue, 5 Dec 2023 11:27:39 +0530 Subject: [PATCH] Migrate to use Ballerina gradle plugin and centralized workflows Update test file --- .gitattributes | 9 + .github/pull_request_template.md | 12 + .../workflows/build-with-bal-test-graalvm.yml | 19 ++ .../workflows/build-with-bal-test-native.yml | 43 --- .github/workflows/ci.yml | 64 +---- .github/workflows/daily-build.yml | 61 +---- .github/workflows/dev-stage-release.yml | 22 ++ .github/workflows/dev-stg-release.yml | 56 ---- .github/workflows/pull-request.yml | 51 +--- .github/workflows/release.yml | 48 ++-- .github/workflows/trivy-scan.yml | 15 ++ .gitignore | 34 ++- README.md | 89 +++++-- ballerina/build.gradle | 81 ++++++ ballerina/tests/test.bal | 7 - build-config/resources/Ballerina.toml | 17 ++ build.gradle | 77 ++++++ changelog.md | 11 + codecov.yml | 11 + examples/build.gradle | 76 ++++++ examples/build.sh | 24 +- gradle.properties | 12 + gradle/wrapper/gradle-wrapper.properties | 7 + gradlew | 249 ++++++++++++++++++ gradlew.bat | 92 +++++++ pull_request_template.md | 39 --- settings.gradle | 46 ++++ 27 files changed, 911 insertions(+), 361 deletions(-) create mode 100644 .gitattributes create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/build-with-bal-test-graalvm.yml delete mode 100644 .github/workflows/build-with-bal-test-native.yml create mode 100644 .github/workflows/dev-stage-release.yml delete mode 100644 .github/workflows/dev-stg-release.yml create mode 100644 .github/workflows/trivy-scan.yml create mode 100644 ballerina/build.gradle create mode 100644 build-config/resources/Ballerina.toml create mode 100644 build.gradle create mode 100644 changelog.md create mode 100644 codecov.yml create mode 100644 examples/build.gradle create mode 100644 gradle.properties create mode 100644 gradle/wrapper/gradle-wrapper.properties create mode 100755 gradlew create mode 100644 gradlew.bat delete mode 100644 pull_request_template.md create mode 100644 settings.gradle diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..097f9f9 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,9 @@ +# +# https://help.github.com/articles/dealing-with-line-endings/ +# +# Linux start script should use lf +/gradlew text eol=lf + +# These are Windows script files and should use crlf +*.bat text eol=crlf + diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..35887fc --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,12 @@ +## Purpose + +Fixes: + +## Examples + +## Checklist +- [ ] Linked to an issue +- [ ] Updated the specification +- [ ] Updated the changelog +- [ ] Added tests +- [ ] Checked native-image compatibility diff --git a/.github/workflows/build-with-bal-test-graalvm.yml b/.github/workflows/build-with-bal-test-graalvm.yml new file mode 100644 index 0000000..da418d7 --- /dev/null +++ b/.github/workflows/build-with-bal-test-graalvm.yml @@ -0,0 +1,19 @@ +name: GraalVM Check + +on: + schedule: + - cron: "30 18 * * *" + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} + cancel-in-progress: true + +jobs: + call_stdlib_workflow: + name: Run StdLib Workflow + if: ${{ github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'ballerina-platform') }} + uses: ballerina-platform/ballerina-standard-library/.github/workflows/build-with-bal-test-graalvm-connector-template.yml@main + secrets: inherit + with: + additional-build-flags: "-x :googleapis.gmail-examples:build" diff --git a/.github/workflows/build-with-bal-test-native.yml b/.github/workflows/build-with-bal-test-native.yml deleted file mode 100644 index 99258ec..0000000 --- a/.github/workflows/build-with-bal-test-native.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: GraalVM Check - -on: - schedule: - - cron: '30 18 * * *' - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Set up GraalVM - uses: graalvm/setup-graalvm@v1 - with: - java-version: '17' - distribution: 'graalvm-community' - set-java-home: false - github-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Check GraalVM installation - run: | - echo "GRAALVM_HOME: ${{ env.GRAALVM_HOME }}" - echo "JAVA_HOME: ${{ env.JAVA_HOME }}" - native-image --version - - - name: Set Up Ballerina - uses: ballerina-platform/setup-ballerina@v1.1.0 - with: - version: latest - - - name: Run Ballerina tests using the native executable - working-directory: ./ballerina - run: bal test --graalvm - env: - JAVA_HOME: /usr/lib/jvm/default-jvm - REFRESH_URL: ${{ secrets.REFRESH_URL }} - REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }} - CLIENT_ID: ${{ secrets.CLIENT_ID }} - CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} - WORKBOOK_PATH: ${{ secrets.WORKBOOK_PATH }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 57d19da..bc81fd4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: CI +name: Build on: push: @@ -6,59 +6,13 @@ on: - master - 2201.[0-9]+.x repository_dispatch: - types: - check_connector_for_breaking_changes + types: check_connector_for_breaking_changes jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - # Setup Ballerina Environment - - name: Set Up Ballerina - uses: ballerina-platform/setup-ballerina@v1.1.0 - with: - version: latest - - # Build Ballerina Project - - name: Ballerina Build - run: bal pack ./ballerina - env: - JAVA_HOME: /usr/lib/jvm/default-jvm - - # Build Module Examples - - name: Ballerina Examples Build - run: chmod +x ./examples/build.sh && ./examples/build.sh build - env: - JAVA_HOME: /usr/lib/jvm/default-jvm - - # Test Ballerina Project - - name: Ballerina Test - run: bal test ./ballerina --test-report --code-coverage --coverage-format=xml - env: - JAVA_HOME: /usr/lib/jvm/default-jvm - REFRESH_URL: ${{ secrets.REFRESH_URL }} - REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }} - CLIENT_ID: ${{ secrets.CLIENT_ID }} - CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} - WORKBOOK_PATH: ${{ secrets.WORKBOOK_PATH }} - - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v3 - - # Send notification when build fails - - name: Alert notifier on failure - if: failure() && (github.event.action == 'check_connector_for_breaking_changes') - run: | - curl -X POST \ - 'https://api.github.com/repos/ballerina-platform/ballerina-release/dispatches' \ - --header 'Accept: application/vnd.github.v3+json' \ - --header 'Authorization: Bearer ${{ secrets.BALLERINA_BOT_TOKEN }}' \ - --data-raw '{ - "event_type": "notify-ballerinax-connector-build-failure", - "client_payload": { - "repoName": "module-ballerinax-microsoft.excel", - "workflow": "CI" - } - }' + call_workflow: + name: Run Connector Build Workflow + if: ${{ github.repository_owner == 'ballerina-platform' }} + uses: ballerina-platform/ballerina-standard-library/.github/workflows/build-connector-template.yml@main + secrets: inherit + with: + repo-name: module-ballerinax-microsoft.excel diff --git a/.github/workflows/daily-build.yml b/.github/workflows/daily-build.yml index 165df62..5559aaf 100644 --- a/.github/workflows/daily-build.yml +++ b/.github/workflows/daily-build.yml @@ -2,58 +2,13 @@ name: Daily build on: schedule: - - cron: '30 2 * * *' + - cron: "30 2 * * *" jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - # Setup Ballerina Environment - - name: Set Up Ballerina - uses: ballerina-platform/setup-ballerina@v1.1.0 - with: - version: latest - - # Build Ballerina Project - - name: Ballerina Build - run: bal pack ./ballerina - env: - JAVA_HOME: /usr/lib/jvm/default-jvm - - # Build Module Examples - - name: Ballerina Examples Build - run: chmod +x ./examples/build.sh && ./examples/build.sh build - env: - JAVA_HOME: /usr/lib/jvm/default-jvm - - # Test Ballerina Project - - name: Ballerina Test - run: bal test ./ballerina --test-report --code-coverage --coverage-format=xml - env: - JAVA_HOME: /usr/lib/jvm/default-jvm - REFRESH_URL: ${{ secrets.REFRESH_URL }} - REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }} - CLIENT_ID: ${{ secrets.CLIENT_ID }} - CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} - WORKBOOK_PATH: ${{ secrets.WORKBOOK_PATH }} - - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v3 - - # Send notification when build fails - - name: Notify failure - if: ${{ failure() }} - run: | - curl -X POST \ - 'https://api.github.com/repos/ballerina-platform/ballerina-release/dispatches' \ - -H 'Accept: application/vnd.github.v3+json' \ - -H 'Authorization: Bearer ${{ secrets.BALLERINA_BOT_TOKEN }}' \ - --data "{ - \"event_type\": \"notify-build-failure\", - \"client_payload\": { - \"repoName\": \"module-ballerinax-microsoft.excel\" - } - }" + call_workflow: + name: Run Daily Build Workflow + if: ${{ github.repository_owner == 'ballerina-platform' }} + uses: ballerina-platform/ballerina-standard-library/.github/workflows/daily-build-connector-template.yml@main + secrets: inherit + with: + repo-name: module-ballerinax-microsoft.excel diff --git a/.github/workflows/dev-stage-release.yml b/.github/workflows/dev-stage-release.yml new file mode 100644 index 0000000..6fbfeae --- /dev/null +++ b/.github/workflows/dev-stage-release.yml @@ -0,0 +1,22 @@ +name: Publish to the Ballerina Dev\Stage Central + +on: + workflow_dispatch: + inputs: + environment: + type: choice + description: Select Environment + required: true + options: + - DEV CENTRAL + - STAGE CENTRAL + +jobs: + call_workflow: + name: Run Dev\Stage Central Publish Workflow + if: ${{ github.repository_owner == 'ballerina-platform' }} + uses: ballerina-platform/ballerina-standard-library/.github/workflows/dev-stage-central-publish-connector-template.yml@main + secrets: inherit + with: + environment: ${{ github.event.inputs.environment }} + additional-publish-flags: "-x :microsoft.excel-examples:build" diff --git a/.github/workflows/dev-stg-release.yml b/.github/workflows/dev-stg-release.yml deleted file mode 100644 index c9bd8eb..0000000 --- a/.github/workflows/dev-stg-release.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: Dev/Staging BCentral Release - -on: - workflow_dispatch: - inputs: - bal_central_environment: - description: Ballerina Central Environment - type: choice - options: - - STAGE - - DEV - required: true - -jobs: - release: - runs-on: ubuntu-latest - env: - BALLERINA_${{ github.event.inputs.bal_central_environment }}_CENTRAL: true - steps: - - uses: actions/checkout@v2 - - # Setup Ballerina Environment - - name: Set Up Ballerina - uses: ballerina-platform/setup-ballerina@v1.1.0 - with: - version: 2201.2.1 - - # Build Ballerina Project - - name: Ballerina Build - run: bal pack ./ballerina - env: - JAVA_HOME: /usr/lib/jvm/default-jvm - - # Build Module Examples - - name: Ballerina Examples Build - run: chmod +x ./examples/build.sh && ./examples/build.sh build - env: - JAVA_HOME: /usr/lib/jvm/default-jvm - - # Push to Ballerina Staging Central - - name: Push to Staging - if: github.event.inputs.bal_central_environment == 'STAGE' - run: bal push - working-directory: ./ballerina - env: - BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_STAGE_ACCESS_TOKEN }} - JAVA_HOME: /usr/lib/jvm/default-jvm - - # Push to Ballerina Dev Central - - name: Push to Dev - if: github.event.inputs.bal_central_environment == 'DEV' - run: bal push - working-directory: ./ballerina - env: - BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_DEV_ACCESS_TOKEN }} - JAVA_HOME: /usr/lib/jvm/default-jvm diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index cf7af45..5dda019 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -1,43 +1,14 @@ -name: Pull Request +name: PR Build -on: [ pull_request ] +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} + cancel-in-progress: true -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - # Setup Ballerina Environment - - name: Set Up Ballerina - uses: ballerina-platform/setup-ballerina@v1.1.0 - with: - version: latest - - # Build Ballerina Project - - name: Ballerina Build - run: bal pack ./ballerina - env: - JAVA_HOME: /usr/lib/jvm/default-jvm +on: pull_request - # Build Module Examples - - name: Ballerina Examples Build - run: chmod +x ./examples/build.sh && ./examples/build.sh build - env: - JAVA_HOME: /usr/lib/jvm/default-jvm - - # Test Ballerina Project - - name: Ballerina Test - # tests will be skipped if the PR is from a forked repository (as the secrets are not available) - if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} - run: bal test ./ballerina --test-report --code-coverage --coverage-format=xml - env: - JAVA_HOME: /usr/lib/jvm/default-jvm - REFRESH_URL: ${{ secrets.REFRESH_URL }} - REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }} - CLIENT_ID: ${{ secrets.CLIENT_ID }} - CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} - WORKBOOK_PATH: ${{ secrets.WORKBOOK_PATH }} - - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v3 +jobs: + call_workflow: + name: Run PR Build Workflow + if: ${{ github.repository_owner == 'ballerina-platform' }} + uses: ballerina-platform/ballerina-standard-library/.github/workflows/pr-build-connector-template.yml@main + secrets: inherit diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 495f63a..aa5ddb7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,37 +1,19 @@ -name: Deployment +name: Publish Release on: - release: - types: [ published ] + workflow_dispatch: + repository_dispatch: + types: [ stdlib-release-pipeline ] jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - # Setup Ballerina Environment - - name: Set Up Ballerina - uses: ballerina-platform/setup-ballerina@v1.1.0 - with: - version: 2201.2.1 - - # Build Ballerina Project - - name: Ballerina Build - run: bal pack ./ballerina - env: - JAVA_HOME: /usr/lib/jvm/default-jvm - - # Build Module Examples - - name: Ballerina Examples Build - run: chmod +x ./examples/build.sh && ./examples/build.sh build - env: - JAVA_HOME: /usr/lib/jvm/default-jvm - - # Push to Ballerina Central - - name: Ballerina Push - run: bal push - working-directory: ./ballerina - env: - BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_DEV_ACCESS_TOKEN }} - JAVA_HOME: /usr/lib/jvm/default-jvm + call_workflow: + name: Run Release Workflow + if: ${{ github.repository_owner == 'ballerina-platform' }} + uses: ballerina-platform/ballerina-standard-library/.github/workflows/release-package-connector-template.yml@main + secrets: inherit + with: + package-name: microsoft.excel + package-org: ballerinax + additional-build-flags: "-x :microsoft.excel-examples:build" + additional-release-flags: "-x :microsoft.excel-examples:build" + additional-publish-flags: "-x :microsoft.excel-examples:build" diff --git a/.github/workflows/trivy-scan.yml b/.github/workflows/trivy-scan.yml new file mode 100644 index 0000000..0eee62f --- /dev/null +++ b/.github/workflows/trivy-scan.yml @@ -0,0 +1,15 @@ +name: Trivy + +on: + workflow_dispatch: + schedule: + - cron: "30 20 * * *" + +jobs: + call_workflow: + name: Run Trivy Scan Workflow + if: ${{ github.repository_owner == 'ballerina-platform' }} + uses: ballerina-platform/ballerina-standard-library/.github/workflows/trivy-scan-template.yml@main + secrets: inherit + with: + additional-build-flags: "-x :microsoft.excel-examples:build" diff --git a/.gitignore b/.gitignore index 930db88..a253ce0 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,9 @@ # Log file *.log +#Config file +Config.toml + # BlueJ files *.ctxt @@ -12,8 +15,8 @@ # Package Files # *.jar +!gradle-wrapper/*.jar *.war -*.nar *.ear *.zip *.tar.gz @@ -22,21 +25,26 @@ # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* -# Target +# Ignore everything in this directory target -# Ignore Gradle project-specific cache directory -.gradle +# mac +.DS_Store -# Ignore Gradle build output directory -build +.classpath +.settings +.project -#Config -Config.toml +.vscode -# Generated json files -excel/resources/*.json -excel/modules/excel/resources/*.json +target +.idea +*.iml +*.ipr +*.iws +.gradle +build +generated -# .DS_Store files -*.DS_Store +# Environment files +*.env \ No newline at end of file diff --git a/README.md b/README.md index 32002d7..c1d2889 100644 --- a/README.md +++ b/README.md @@ -13,35 +13,88 @@ This connector provides operations for connecting and interacting with Microsoft For more information about configuration and operations, go to the module. - [`microsoft.excel`](excel/Module.md) - Perform CRUD operations in Microsoft Excel worksheet table, and chart. -## Building from the source -### Setting up the prerequisites +## Issues and projects -1. Download and install Java SE Development Kit (JDK) version 11. You can install either [OpenJDK](https://adoptopenjdk.net/) or [Oracle JDK](https://www.oracle.com/java/technologies/javase-jdk11-downloads.html). +The **Issues** and **Projects** tabs are disabled for this repository as this is part of the Ballerina library. To report bugs, request new features, start new discussions, view project boards, etc., visit the Ballerina library [parent repository](https://github.com/ballerina-platform/ballerina-library). - > **Note:** Set the JAVA_HOME environment variable to the path name of the directory into which you installed JDK. +This repository only contains the source code for the package. -2. Download and install [Ballerina Swan Lake](https://ballerina.io/). +## Build from the source -### Building the source -Execute the commands below to build from the source after installing Ballerina. +### Prerequisites + +1. Download and install Java SE Development Kit (JDK) version 17. You can download it from either of the following sources: + + * [Oracle JDK](https://www.oracle.com/java/technologies/downloads/) + * [OpenJDK](https://adoptium.net/) + + > **Note:** After installation, remember to set the `JAVA_HOME` environment variable to the directory where JDK was installed. + +2. Download and install [Ballerina Swan Lake](https://ballerina.io/). + +3. Download and install [Docker](https://www.docker.com/get-started). + + > **Note**: Ensure that the Docker daemon is running before executing any tests. + +### Build options + +Execute the commands below to build from the source. 1. To build the package: - ``` - bal build ./ballerina - ``` -2. To run tests after build: - ``` - bal test ./ballerina + + ```bash + ./gradlew clean build + ``` + +2. To run the tests: + + ```bash + ./gradlew clean test + ``` + +3. To build the without the tests: + + ```bash + ./gradlew clean build -x test + ``` + +4. To debug package with a remote debugger: + + ```bash + ./gradlew clean build -Pdebug= + ``` + +5. To debug with the Ballerina language: + + ```bash + ./gradlew clean build -PbalJavaDebug= + ``` + +6. Publish the generated artifacts to the local Ballerina Central repository: + + ```bash + ./gradlew clean build -PpublishToLocalCentral=true ``` -## Contributing to Ballerina -As an open source project, Ballerina welcomes contributions from the community. -For more information, go to the [contribution guidelines](https://github.com/ballerina-platform/ballerina-lang/blob/main/CONTRIBUTING.md). +7. Publish the generated artifacts to the Ballerina Central repository: + + ```bash + ./gradlew clean build -PpublishToCentral=true + ``` + +## Contribute to Ballerina + +As an open-source project, Ballerina welcomes contributions from the community. + +For more information, go to the [contribution guidelines](https://github.com/ballerina-platform/ballerina-lang/blob/master/CONTRIBUTING.md). ## Code of conduct -All contributors are encouraged to read the [Ballerina Code of Conduct](https://ballerina.io/code-of-conduct). + +All the contributors are encouraged to read the [Ballerina Code of Conduct](https://ballerina.io/code-of-conduct). ## Useful links -* Discuss about code changes of the Ballerina project in [ballerina-dev@googlegroups.com](mailto:ballerina-dev@googlegroups.com). + +* For more information go to the [`microsoft.excel` package](https://lib.ballerina.io/ballerinax/microsoft.excel/latest). +* For example demonstrations of the usage, go to [Ballerina By Examples](https://ballerina.io/learn/by-example/). * Chat live with us via our [Discord server](https://discord.gg/ballerinalang). * Post all technical questions on Stack Overflow with the [#ballerina](https://stackoverflow.com/questions/tagged/ballerina) tag. diff --git a/ballerina/build.gradle b/ballerina/build.gradle new file mode 100644 index 0000000..3b84faf --- /dev/null +++ b/ballerina/build.gradle @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import org.apache.tools.ant.taskdefs.condition.Os + +plugins { + id 'io.ballerina.plugin' +} + +description = 'Excel - Ballerina' + +def packageName = "microsoft.excel" +def packageOrg = "ballerinax" +def tomlVersion = stripBallerinaExtensionVersion("${project.version}") +def ballerinaTomlFilePlaceHolder = new File("${project.rootDir}/build-config/resources/Ballerina.toml") +def ballerinaTomlFile = new File("$project.projectDir/Ballerina.toml") + +def stripBallerinaExtensionVersion(String extVersion) { + if (extVersion.matches(project.ext.timestampedVersionRegex)) { + def splitVersion = extVersion.split('-') + if (splitVersion.length > 3) { + def strippedValues = splitVersion[0..-4] + return strippedValues.join('-') + } else { + return extVersion + } + } else { + return extVersion.replace("${project.ext.snapshotVersion}", "") + } +} + +ballerina { + packageOrganization = packageOrg + module = packageName + testCoverageParam = "--code-coverage --coverage-format=xml --excludes=\"modules/oas/**\"" + buildOnDockerImage = "2201.8.4" + platform = "any" +} + +task updateTomlFiles { + doLast { + def newBallerinaToml = ballerinaTomlFilePlaceHolder.text.replace("@project.version@", project.version) + newBallerinaToml = newBallerinaToml.replace("@toml.version@", tomlVersion) + ballerinaTomlFile.text = newBallerinaToml + } +} + +task commitTomlFiles { + doLast { + project.exec { + ignoreExitValue true + if (Os.isFamily(Os.FAMILY_WINDOWS)) { + commandLine 'cmd', '/c', "git commit -m \"[Automated] Update the toml files\" Ballerina.toml Dependencies.toml" + } else { + commandLine 'sh', '-c', "git commit -m '[Automated] Update the toml files' Ballerina.toml Dependencies.toml" + } + } + } +} + +clean { + delete 'build' +} + +publishToMavenLocal.dependsOn build +publish.dependsOn build diff --git a/ballerina/tests/test.bal b/ballerina/tests/test.bal index e0d0c97..f97cd7a 100644 --- a/ballerina/tests/test.bal +++ b/ballerina/tests/test.bal @@ -14,16 +14,9 @@ // specific language governing permissions and limitations // under the License. -import ballerina/os; import ballerina/log; import ballerina/test; -configurable string clientId = os:getEnv("CLIENT_ID"); -configurable string clientSecret = os:getEnv("CLIENT_SECRET"); -configurable string refreshToken = os:getEnv("REFRESH_TOKEN"); -configurable string refreshUrl = os:getEnv("REFRESH_URL"); -configurable string workbookIdOrPath = os:getEnv("WORKBOOK_PATH"); - ConnectionConfig configuration = { auth: { clientId: clientId, diff --git a/build-config/resources/Ballerina.toml b/build-config/resources/Ballerina.toml new file mode 100644 index 0000000..8be5a6e --- /dev/null +++ b/build-config/resources/Ballerina.toml @@ -0,0 +1,17 @@ +[package] +distribution = "2201.8.0" +org = "ballerinax" +name = "microsoft.excel" +version = "@toml.version@" +authors = ["Ballerina"] +export = ["microsoft.excel"] +repository = "https://github.com/ballerina-platform/module-ballerinax-googleapis.gmail" +keywords = ["Productivity/Spreadsheets", "Cost/Free", "Vendor/Microsoft"] +icon = "icon.png" +license = ["Apache-2.0"] + +[build-options] +observabilityIncluded = true + +[platform.java17] +graalvmCompatible = true diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..22782f9 --- /dev/null +++ b/build.gradle @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +plugins { + id 'com.github.spotbugs-base' + id 'com.github.johnrengelman.shadow' + id 'de.undercouch.download' + id 'net.researchgate.release' +} + +allprojects { + group = project.group + version = project.version + + apply plugin: 'maven-publish' + + repositories { + mavenLocal() + maven { + url = 'https://maven.wso2.org/nexus/content/repositories/releases/' + } + + maven { + url = 'https://maven.wso2.org/nexus/content/groups/wso2-public/' + } + + maven { + url = 'https://repo.maven.apache.org/maven2' + } + + maven { + url = 'https://maven.pkg.github.com/ballerina-platform/*' + credentials { + username System.getenv("packageUser") + password System.getenv("packagePAT") + } + } + } + + ext { + snapshotVersion = '-SNAPSHOT' + timestampedVersionRegex = '.*-\\d{8}-\\d{6}-\\w.*\$' + } +} + +def moduleVersion = project.version.replace("-SNAPSHOT", "") + +task build { + dependsOn(':microsoft.excel.-ballerina:build') + dependsOn(':microsoft.excel-examples:build') +} + +release { + buildTasks = ['build'] + failOnSnapshotDependencies = true + versionPropertyFile = 'gradle.properties' + tagTemplate = 'v${version}' + git { + requireBranch = "release-${moduleVersion}" + pushToRemote = 'origin' + } +} diff --git a/changelog.md b/changelog.md new file mode 100644 index 0000000..b9437a9 --- /dev/null +++ b/changelog.md @@ -0,0 +1,11 @@ +# Changelog +This file contains all the notable changes done to the Ballerina SQL package through the releases. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +### Added + +### Changed \ No newline at end of file diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..b675e7e --- /dev/null +++ b/codecov.yml @@ -0,0 +1,11 @@ +ignore: + - "examples" + +coverage: + precision: 2 + round: down + range: "60...80" + status: + project: + default: + target: 80 diff --git a/examples/build.gradle b/examples/build.gradle new file mode 100644 index 0000000..ff28358 --- /dev/null +++ b/examples/build.gradle @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2023, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import org.apache.tools.ant.taskdefs.condition.Os + +apply plugin: 'java' + +def graalvmFlag = "" + +task testExamples { + if (project.hasProperty("balGraalVMTest")) { + graalvmFlag = "--graalvm" + } + doLast { + try { + exec { + workingDir project.projectDir + println("Working dir: ${workingDir}") + if (Os.isFamily(Os.FAMILY_WINDOWS)) { + commandLine 'sh', "/c", "chmod +x ./build.sh && ./build.sh run && exit %%ERRORLEVEL%%" + } else { + commandLine 'sh', "-c", "chmod +x ./build.sh && ./build.sh run" + } + } + } catch (Exception e) { + println("Example Build failed: " + e.message) + throw e + } + } +} + +task buildExamples { + gradle.taskGraph.whenReady { graph -> + if (graph.hasTask(":excel-examples:test")) { + buildExamples.enabled = false + } else { + testExamples.enabled = false + } + } + doLast { + try { + exec { + workingDir project.projectDir + println("Working dir: ${workingDir}") + if (Os.isFamily(Os.FAMILY_WINDOWS)) { + commandLine 'sh', "/c", "chmod +x ./build.s && ./build.sh build && exit %%ERRORLEVEL%%" + } else { + commandLine 'sh', "-c", "chmod +x ./build.sh && ./build.sh build" + } + } + } catch (Exception e) { + println("Example Build failed: " + e.message) + throw e + } + } +} + +buildExamples.dependsOn ":microsoft.excel.-ballerina:build" +testExamples.dependsOn ":microsoft.excel-ballerina:build" +test.dependsOn testExamples +build.dependsOn buildExamples diff --git a/examples/build.sh b/examples/build.sh index f533627..6860bf5 100755 --- a/examples/build.sh +++ b/examples/build.sh @@ -1,7 +1,7 @@ #!/bin/bash BAL_EXAMPLES_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -BAL_CENTRAL_DIR="$HOME/.ballerina/repositories/central.ballerina.io/" +BAL_CENTRAL_DIR="$HOME/.ballerina/repositories/central.ballerina.io" BAL_HOME_DIR="$BAL_EXAMPLES_DIR/../ballerina" set -e @@ -28,12 +28,15 @@ cd "$BAL_HOME_DIR" && bal push --repository=local # Remove the cache directories in the repositories -cacheDirs=($(ls -d "$BAL_CENTRAL_DIR"/cache-* 2>/dev/null)) +cacheDirs=$(ls -d $BAL_CENTRAL_DIR/cache-* 2>/dev/null) || true for dir in "${cacheDirs[@]}"; do [ -d "$dir" ] && rm -r "$dir" done echo "Successfully cleaned the cache directories" +# Create the package directory in the central repository, this will not be present if no modules are pulled +mkdir -p "$BAL_CENTRAL_DIR/bala/ballerinax/$BAL_PACKAGE_NAME" + # Update the central repository BAL_DESTINATION_DIR="$HOME/.ballerina/repositories/central.ballerina.io/bala/ballerinax/$BAL_PACKAGE_NAME" BAL_SOURCE_DIR="$HOME/.ballerina/repositories/local/bala/ballerinax/$BAL_PACKAGE_NAME" @@ -41,7 +44,20 @@ BAL_SOURCE_DIR="$HOME/.ballerina/repositories/local/bala/ballerinax/$BAL_PACKAGE [ -d "$BAL_SOURCE_DIR" ] && cp -r "$BAL_SOURCE_DIR" "$BAL_DESTINATION_DIR" echo "Successfully updated the local central repositories" +echo "$BAL_DESTINATION_DIR" +echo "$BAL_SOURCE_DIR" + # Loop through examples in the examples directory -find "$BAL_EXAMPLES_DIR" -type f -name "*.bal" | while read -r BAL_EXAMPLE_FILE; do - bal "$BAL_CMD" --offline "$BAL_EXAMPLE_FILE" +cd "$BAL_EXAMPLES_DIR" +for dir in $(find "$BAL_EXAMPLES_DIR" -type d -maxdepth 1 -mindepth 1); do + # Skip the build directory + if [[ "$dir" == *build ]]; then + continue + fi + (cd "$dir" && bal "$BAL_CMD" --offline && cd ..); +done + +# Remove generated JAR files +find "$BAL_HOME_DIR" -maxdepth 1 -type f -name "*.jar" | while read -r JAR_FILE; do + rm "$JAR_FILE" done diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..f7000e1 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,12 @@ +org.gradle.caching=true +group=io.ballerina.stdlib +version=3.0.0-SNAPSHOT + +checkstylePluginVersion=10.12.0 +spotbugsPluginVersion=5.0.14 +shadowJarPluginVersion=8.1.1 +downloadPluginVersion=5.4.0 +releasePluginVersion=2.8.0 +testngVersion=7.6.1 +eclipseLsp4jVersion=0.12.0 +ballerinaGradlePluginVersion=2.1.8 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..9f4197d --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..0adc8e1 --- /dev/null +++ b/gradlew @@ -0,0 +1,249 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..93e3f59 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,92 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/pull_request_template.md b/pull_request_template.md deleted file mode 100644 index 731e098..0000000 --- a/pull_request_template.md +++ /dev/null @@ -1,39 +0,0 @@ -# Description - -Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. - -Fixes # (issue) - -Related Pull Requests (remove if not relevant) -- Pull request 1 -- Pull request 2 - -One line release note: -- One line describing the feature/improvement/fix made by this PR - -## Type of change - -Please delete options that are not relevant. - -- [ ] Bug fix (non-breaking change which fixes an issue) -- [ ] New feature (non-breaking change which adds functionality) -- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) -- [ ] This change requires a documentation update - -# How Has This Been Tested? - -Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration - -- [ ] Test A -- [ ] Test B - -**Test Configuration**: -* Ballerina Version: -* Operating System: -* Java SDK: - -# Checklist: - -### Security checks - - [ ] Followed secure coding standards in http://wso2.com/technical-reports/wso2-secure-engineering-guidelines? - - [ ] Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets? diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..471ba7a --- /dev/null +++ b/settings.gradle @@ -0,0 +1,46 @@ +/* + * This file was generated by the Gradle 'init' task. + * + * The settings file is used to specify which projects to include in your build. + * For more detailed information on multi-project builds, please refer to https://docs.gradle.org/8.3/userguide/building_swift_projects.html in the Gradle documentation. + */ + +pluginManagement { + plugins { + id "com.github.spotbugs-base" version "${spotbugsPluginVersion}" + id "com.github.johnrengelman.shadow" version "${shadowJarPluginVersion}" + id "de.undercouch.download" version "${downloadPluginVersion}" + id "net.researchgate.release" version "${releasePluginVersion}" + id "io.ballerina.plugin" version "${ballerinaGradlePluginVersion}" + } + + repositories { + gradlePluginPortal() + maven { + url = 'https://maven.pkg.github.com/ballerina-platform/*' + credentials { + username System.getenv("packageUser") + password System.getenv("packagePAT") + } + } + } +} + +plugins { + id "com.gradle.enterprise" version "3.2" +} + +rootProject.name = 'module-ballerinax-microsoft.excel' + +include ':microsoft.excel-ballerina' +include ':microsoft.excel-examples' + +project(':microsoft.excel-ballerina').projectDir = file("ballerina") +project(':microsoft.excel-examples').projectDir = file("examples") + +gradleEnterprise { + buildScan { + termsOfServiceUrl = 'https://gradle.com/terms-of-service' + termsOfServiceAgree = 'yes' + } +}