From 6d8e93e4f9b0c5dc0700a60d1f895bba02143c70 Mon Sep 17 00:00:00 2001 From: ravinperera00 Date: Fri, 8 Nov 2024 00:37:12 +0530 Subject: [PATCH 1/4] Migrate to Java 21 --- .../workflows/build-timestamped-master.yml | 7 ++-- .github/workflows/publish-release.yaml | 6 +-- .github/workflows/pull-request.yml | 12 +++--- README.md | 2 +- gradle.properties | 42 +++++++++---------- 5 files changed, 35 insertions(+), 34 deletions(-) diff --git a/.github/workflows/build-timestamped-master.yml b/.github/workflows/build-timestamped-master.yml index c5192206..ec0f50b6 100644 --- a/.github/workflows/build-timestamped-master.yml +++ b/.github/workflows/build-timestamped-master.yml @@ -3,6 +3,7 @@ on: push: branches: - main + - java21 workflow_dispatch: jobs: @@ -11,11 +12,11 @@ jobs: if: github.repository_owner == 'ballerina-platform' steps: - uses: actions/checkout@v3 - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v3 with: - distribution: 'adopt' - java-version: 17.0.7 + distribution: 'temurin' + java-version: 21.0.3 - name: Change to Timestamped Version run: | startTime=$(TZ="Asia/Kolkata" date +'%Y%m%d-%H%M00') diff --git a/.github/workflows/publish-release.yaml b/.github/workflows/publish-release.yaml index 89e6ea1a..993873cc 100644 --- a/.github/workflows/publish-release.yaml +++ b/.github/workflows/publish-release.yaml @@ -8,11 +8,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v3 with: - distribution: 'adopt' - java-version: 17 + distribution: 'temurin' + java-version: 21 - name: Set version env variable run: echo "VERSION=$((grep -w "version" | cut -d= -f2) < gradle.properties | rev | cut --complement -d- -f1 | rev)" >> $GITHUB_ENV - name: Pre release depenency version update diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 30997f79..97205471 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -10,11 +10,11 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v3 with: - distribution: 'adopt' - java-version: 17.0.7 + distribution: 'temurin' + java-version: 21.0.3 - name: Build with Gradle env: packageUser: ${{ github.actor }} @@ -31,11 +31,11 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v3 with: - distribution: 'adopt' - java-version: 17.0.7 + distribution: 'temurin' + java-version: 21.0.3 - name: Build with Gradle env: packageUser: ${{ github.actor }} diff --git a/README.md b/README.md index 07308471..c3966709 100644 --- a/README.md +++ b/README.md @@ -186,7 +186,7 @@ This will generate a Ballerina module (project_name) corresponding to each Graph ### Setting Up the Prerequisites -1. Download and install Java SE Development Kit (JDK) version 17. You can install either [OpenJDK](https://adoptopenjdk.net/) or [Oracle](https://www.oracle.com/java/technologies/downloads/). +1. Download and install Java SE Development Kit (JDK) version 21. You can install either [OpenJDK](https://adoptopenjdk.net/) or [Oracle](https://www.oracle.com/java/technologies/downloads/). > **Note:** Set the JAVA_HOME environment variable to the path name of the directory into which you installed JDK. diff --git a/gradle.properties b/gradle.properties index b6fb054d..15583800 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ version=0.11.1-SNAPSHOT org.gradle.jvmargs=-Xmx4096M #dependency -ballerinaLangVersion=2201.10.0 +ballerinaLangVersion=2201.10.0-20241025-103700-5c9e6a27 checkstylePluginVersion=10.12.1 shadowJarPluginVersion=8.1.1 downloadPluginVersion=5.4.0 @@ -21,37 +21,37 @@ picocliVersion=4.7.4 # Standard Library Dependencies # Level 01 -stdlibIoVersion=1.6.0 -stdlibTimeVersion=2.4.0 -stdlibUrlVersion=2.4.0 +stdlibIoVersion=1.6.2-20240928-084100-656404f +stdlibTimeVersion=2.5.1-20240930-120200-e59222b +stdlibUrlVersion=2.4.1-20240930-120200-b7fb9e1 # Level 02 -stdlibConstraintVersion=1.5.0 -stdlibCryptoVersion=2.7.0 -stdlibLogVersion=2.10.0 -stdlibOsVersion=1.8.0 -stdlibTaskVersion=2.5.0 +stdlibConstraintVersion=1.5.1-20240930-123400-5ecd396 +stdlibCryptoVersion=2.7.3-20240930-132000-5ecc9ab +stdlibLogVersion=2.10.1-20240930-154200-5ab2aa4 +stdlibOsVersion=1.8.1-20241001-120600-dd1626e +stdlibTaskVersion=2.5.1-20241002-145700-5bdb843 # Level 03 -stdlibCacheVersion=3.8.0 -stdlibFileVersion=1.10.0 -stdlibMimeVersion=2.10.0 -stdlibUuidVersion=1.8.0 +stdlibCacheVersion=3.8.1-20241007-154900-63f4403 +stdlibFileVersion=1.10.1-20241007-160900-03f7b64 +stdlibMimeVersion=2.10.1-20241009-141200-8b6c9f0 +stdlibUuidVersion=1.8.1-20241009-134600-a05012b # Level 04 -stdlibAuthVersion=2.12.0 -stdlibJwtVersion=2.13.0 -stdlibOAuth2Version=2.12.0 +stdlibAuthVersion=2.12.1-20241010-130800-733dbef +stdlibJwtVersion=2.13.1-20241010-123600-5ea6a94 +stdlibOAuth2Version=2.12.1-20241029-084800-d7ba9e5 # Level 05 -stdlibHttpVersion=2.12.0 +stdlibHttpVersion=2.13.0-20241029-110700-30ed05b # Level 06 -stdlibWebsocketVersion=2.12.0 +stdlibWebsocketVersion=2.12.1-20241104-132000-aba9ccb # Level 07 -stdlibGraphqlVersion=1.14.0 +stdlibGraphqlVersion=1.14.1-20241106-150100-7a32b9e # Ballerinax Observer -observeVersion=1.3.0-20240814-114100-0f71e1e -observeInternalVersion=1.3.0-20240814-114900-8a734a3 +observeVersion=1.3.1-20241007-161000-645452d +observeInternalVersion=1.3.1-20241015-172900-cdc3cb3 From c5748e42a7e4d86490c868de2a0fffc4ac3ce4be Mon Sep 17 00:00:00 2001 From: ravinperera00 Date: Sun, 17 Nov 2024 18:04:54 +0530 Subject: [PATCH 2/4] Migrate to new Runtime APIs --- build.gradle | 1 + gradle.properties | 43 ++++++++++++++++++++++--------------------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/build.gradle b/build.gradle index 8c0ee636..a7e4a9ce 100644 --- a/build.gradle +++ b/build.gradle @@ -96,6 +96,7 @@ subprojects { ballerinaStdLibs "io.ballerina.stdlib:file-ballerina:${stdlibFileVersion}" ballerinaStdLibs "io.ballerina.stdlib:mime-ballerina:${stdlibMimeVersion}" ballerinaStdLibs "io.ballerina.stdlib:uuid-ballerina:${stdlibUuidVersion}" + ballerinaStdLibs "io.ballerina.lib:data.jsondata-ballerina:${stdlibDataJsonDataVersion}" ballerinaStdLibs "io.ballerina.stdlib:auth-ballerina:${stdlibAuthVersion}" ballerinaStdLibs "io.ballerina.stdlib:jwt-ballerina:${stdlibJwtVersion}" ballerinaStdLibs "io.ballerina.stdlib:oauth2-ballerina:${stdlibOAuth2Version}" diff --git a/gradle.properties b/gradle.properties index 15583800..a4ff65ee 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ version=0.11.1-SNAPSHOT org.gradle.jvmargs=-Xmx4096M #dependency -ballerinaLangVersion=2201.10.0-20241025-103700-5c9e6a27 +ballerinaLangVersion=2201.11.0-20241117-133400-a3054b77 checkstylePluginVersion=10.12.1 shadowJarPluginVersion=8.1.1 downloadPluginVersion=5.4.0 @@ -21,37 +21,38 @@ picocliVersion=4.7.4 # Standard Library Dependencies # Level 01 -stdlibIoVersion=1.6.2-20240928-084100-656404f -stdlibTimeVersion=2.5.1-20240930-120200-e59222b -stdlibUrlVersion=2.4.1-20240930-120200-b7fb9e1 +stdlibIoVersion=1.6.2-20241112-233100-995cf5f +stdlibTimeVersion=2.6.0-20241113-073800-201b904 +stdlibUrlVersion=2.4.1-20241113-073900-335ff51 # Level 02 -stdlibConstraintVersion=1.5.1-20240930-123400-5ecd396 -stdlibCryptoVersion=2.7.3-20240930-132000-5ecc9ab -stdlibLogVersion=2.10.1-20240930-154200-5ab2aa4 -stdlibOsVersion=1.8.1-20241001-120600-dd1626e -stdlibTaskVersion=2.5.1-20241002-145700-5bdb843 +stdlibConstraintVersion=1.6.0-20241113-090900-d276ad5 +stdlibCryptoVersion=2.7.3-20241113-081400-d015a39 +stdlibLogVersion=2.10.1-20241113-120000-4577868 +stdlibOsVersion=1.8.1-20241113-122000-cca973b +stdlibTaskVersion=2.5.1-20241113-123500-f905281 # Level 03 -stdlibCacheVersion=3.8.1-20241007-154900-63f4403 -stdlibFileVersion=1.10.1-20241007-160900-03f7b64 -stdlibMimeVersion=2.10.1-20241009-141200-8b6c9f0 -stdlibUuidVersion=1.8.1-20241009-134600-a05012b +stdlibCacheVersion=3.8.1-20241113-125700-b75a1bf +stdlibFileVersion=1.10.1-20241113-151700-e1a2e38 +stdlibMimeVersion=2.10.2-20241113-154200-d953747 +stdlibUuidVersion=1.8.1-20241113-154400-443c67b # Level 04 -stdlibAuthVersion=2.12.1-20241010-130800-733dbef -stdlibJwtVersion=2.13.1-20241010-123600-5ea6a94 -stdlibOAuth2Version=2.12.1-20241029-084800-d7ba9e5 +stdlibDataJsonDataVersion=0.3.0-20241114-143900-285d739 +stdlibAuthVersion=2.12.1-20241113-162300-ded40eb +stdlibJwtVersion=2.13.1-20241113-162400-b59ccfa +stdlibOAuth2Version=2.12.1-20241113-162400-4c6ddfe # Level 05 -stdlibHttpVersion=2.13.0-20241029-110700-30ed05b +stdlibHttpVersion=2.13.0-20241114-182900-7e9f66a # Level 06 -stdlibWebsocketVersion=2.12.1-20241104-132000-aba9ccb +stdlibWebsocketVersion=2.13.0-20241116-202000-ddd958d # Level 07 -stdlibGraphqlVersion=1.14.1-20241106-150100-7a32b9e +stdlibGraphqlVersion=1.15.0-20241117-164000-4d95b39 # Ballerinax Observer -observeVersion=1.3.1-20241007-161000-645452d -observeInternalVersion=1.3.1-20241015-172900-cdc3cb3 +observeVersion=1.4.0-20241113-092000-b83ae74 +observeInternalVersion=1.3.1-20241113-101700-265054d From 8a880def14ac386b150f8fba192d5a5882de802a Mon Sep 17 00:00:00 2001 From: ravinperera00 Date: Mon, 18 Nov 2024 14:54:14 +0530 Subject: [PATCH 3/4] Use main branch for github actions --- .github/workflows/build-timestamped-master.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-timestamped-master.yml b/.github/workflows/build-timestamped-master.yml index ec0f50b6..9c84f092 100644 --- a/.github/workflows/build-timestamped-master.yml +++ b/.github/workflows/build-timestamped-master.yml @@ -3,7 +3,6 @@ on: push: branches: - main - - java21 workflow_dispatch: jobs: From 0e7d54a3185096a684d734bfea0b7ee7463962de Mon Sep 17 00:00:00 2001 From: ravinperera00 Date: Tue, 19 Nov 2024 14:39:49 +0530 Subject: [PATCH 4/4] Fix java version error --- .github/workflows/publish-release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-release.yaml b/.github/workflows/publish-release.yaml index 993873cc..d122d1d0 100644 --- a/.github/workflows/publish-release.yaml +++ b/.github/workflows/publish-release.yaml @@ -12,7 +12,7 @@ jobs: uses: actions/setup-java@v3 with: distribution: 'temurin' - java-version: 21 + java-version: 21.0.3 - name: Set version env variable run: echo "VERSION=$((grep -w "version" | cut -d= -f2) < gradle.properties | rev | cut --complement -d- -f1 | rev)" >> $GITHUB_ENV - name: Pre release depenency version update