Skip to content

Commit

Permalink
Merge pull request #1652 from warunalakshitha/java21
Browse files Browse the repository at this point in the history
Migrate to Java 21
  • Loading branch information
warunalakshitha authored Nov 6, 2024
2 parents 247ec55 + 5d90a35 commit 3da09ef
Show file tree
Hide file tree
Showing 29 changed files with 365 additions and 328 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-timestamped-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ jobs:
call_workflow:
name: Run Build Workflow
if: ${{ github.repository_owner == 'ballerina-platform' }}
uses: ballerina-platform/ballerina-library/.github/workflows/build-timestamp-master-template.yml@main
uses: ballerina-platform/ballerina-library/.github/workflows/build-timestamp-master-template.yml@java21
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/build-with-bal-test-graalvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ 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-library/.github/workflows/build-with-bal-test-graalvm-template.yml@main
uses: ballerina-platform/ballerina-library/.github/workflows/build-with-bal-test-graalvm-template.yml@java21
with:
lang_tag: ${{ inputs.lang_tag }}
lang_version: ${{ inputs.lang_version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/central-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
call_workflow:
name: Run Central Publish Workflow
if: ${{ github.repository_owner == 'ballerina-platform' }}
uses: ballerina-platform/ballerina-library/.github/workflows/central-publish-template.yml@main
uses: ballerina-platform/ballerina-library/.github/workflows/central-publish-template.yml@java21
secrets: inherit
with:
environment: ${{ github.event.inputs.environment }}
2 changes: 1 addition & 1 deletion .github/workflows/process-load-test-result.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
call_stdlib_process_load_test_results_workflow:
name: Run StdLib Process Load Test Results Workflow
uses: ballerina-platform/ballerina-library/.github/workflows/process-load-test-results-template.yml@main
uses: ballerina-platform/ballerina-library/.github/workflows/process-load-test-results-template.yml@java21
with:
results: ${{ toJson(github.event.client_payload.results) }}
secrets:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
call_workflow:
name: Run Release Workflow
if: ${{ github.repository_owner == 'ballerina-platform' }}
uses: ballerina-platform/ballerina-library/.github/workflows/release-package-template.yml@main
uses: ballerina-platform/ballerina-library/.github/workflows/release-package-template.yml@java21
secrets: inherit
with:
package-name: grpc
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ jobs:
call_workflow:
name: Run PR Build Workflow
if: ${{ github.repository_owner == 'ballerina-platform' }}
uses: ballerina-platform/ballerina-library/.github/workflows/pull-request-build-template.yml@main
uses: ballerina-platform/ballerina-library/.github/workflows/pull-request-build-template.yml@java21
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/trigger-load-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
call_stdlib_trigger_load_test_workflow:
name: Run StdLib Load Test Workflow
if: ${{ github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'ballerina-platform') }}
uses: ballerina-platform/ballerina-library/.github/workflows/trigger-load-tests-template.yml@main
uses: ballerina-platform/ballerina-library/.github/workflows/trigger-load-tests-template.yml@java21
with:
repo_name: 'module-ballerina-grpc'
runtime_artifacts_url: 'https://api.github.com/repos/ballerina-platform/module-ballerina-grpc/actions/artifacts'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trivy-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ jobs:
call_workflow:
name: Run Trivy Scan Workflow
if: ${{ github.repository_owner == 'ballerina-platform' }}
uses: ballerina-platform/ballerina-library/.github/workflows/trivy-scan-template.yml@main
uses: ballerina-platform/ballerina-library/.github/workflows/trivy-scan-template.yml@java21
secrets: inherit
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ This repository only contains the source code for the module.

### Set Up the prerequisites

* Download and install Java SE Development Kit (JDK) version 17 (from one of the following locations).
* Download and install Java SE Development Kit (JDK) version 21 (from one of the following locations).

* [Oracle](https://www.oracle.com/java/technologies/downloads/)

Expand Down
12 changes: 6 additions & 6 deletions ballerina-tests/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,33 @@ org = "ballerina"
name = "grpc_tests"
version = "@toml.version@"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "grpc-native"
version = "@project.version@"
path = "../native/build/libs/grpc-native-@project.version@.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
path = "../test-utils/build/libs/grpc-test-utils-@project.version@.jar"
scope = "testOnly"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
path = "./lib/ballerina-cli-@ballerinalang.version@.jar"
scope = "testOnly"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "com.google.protobuf"
artifactId = "protobuf-java"
version = "@protobuf.java.version@"
path = "./lib/protobuf-java-@protobuf.java.version@.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "com.google.api.grpc"
artifactId = "proto-google-common-protos"
version = "@proto.google.commons.version@"
path = "./lib/proto-google-common-protos-@proto.google.commons.version@.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "org.ballerinalang"
artifactId = "formatter-core"
version = "@ballerinalang.version@"
Expand Down
84 changes: 42 additions & 42 deletions ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
org = "ballerina"
name = "grpc"
version = "1.12.1"
version = "1.12.2"
distribution = "2201.10.0"
authors = ["Ballerina"]
keywords = ["network", "grpc", "protobuf", "server-streaming", "client-streaming", "bidirectional-streaming"]
Expand All @@ -10,164 +10,164 @@ icon = "icon.png"
license = ["Apache-2.0"]
export = ["grpc", "grpc.types.duration", "grpc.types.struct", "grpc.types.timestamp", "grpc.types.wrappers", "grpc.types.any"]

[platform.java17]
[platform.java21]
graalvmCompatible = true

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "grpc-native"
version = "1.12.1"
path = "../native/build/libs/grpc-native-1.12.1.jar"
version = "1.12.2"
path = "../native/build/libs/grpc-native-1.12.2-SNAPSHOT.jar"

[[platform.java17.dependency]]
path = "../test-utils/build/libs/grpc-test-utils-1.12.1.jar"
[[platform.java21.dependency]]
path = "../test-utils/build/libs/grpc-test-utils-1.12.2-SNAPSHOT.jar"
scope = "testOnly"

[[platform.java17.dependency]]
path = "./lib/ballerina-cli-2201.10.0.jar"
[[platform.java21.dependency]]
path = "./lib/ballerina-cli-2201.10.0-20241025-103700-5c9e6a27.jar"
scope = "testOnly"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
path = "./lib/antlr4-runtime-4.5.1.wso2v1.jar"
scope = "testOnly"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "http-native"
version = "2.12.0"
path = "./lib/http-native-2.12.0.jar"
version = "2.13.0"
path = "./lib/http-native-2.13.0-20241029-110700-30ed05b.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.netty"
artifactId = "netty-common"
version = "4.1.108.Final"
path = "./lib/netty-common-4.1.108.Final.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.netty"
artifactId = "netty-buffer"
version = "4.1.108.Final"
path = "./lib/netty-buffer-4.1.108.Final.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.netty"
artifactId = "netty-transport"
version = "4.1.108.Final"
path = "./lib/netty-transport-4.1.108.Final.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.netty"
artifactId = "netty-resolver"
version = "4.1.108.Final"
path = "./lib/netty-resolver-4.1.108.Final.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.netty"
artifactId = "netty-handler"
version = "4.1.108.Final"
path = "./lib/netty-handler-4.1.108.Final.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.netty"
artifactId = "netty-codec-http"
version = "4.1.108.Final"
path = "./lib/netty-codec-http-4.1.108.Final.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.netty"
artifactId = "netty-codec"
version = "4.1.108.Final"
path = "./lib/netty-codec-4.1.108.Final.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.netty"
artifactId = "netty-handler-proxy"
version = "4.1.108.Final"
path = "./lib/netty-handler-proxy-4.1.108.Final.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.netty"
artifactId = "netty-codec-http2"
version = "4.1.108.Final"
path = "./lib/netty-codec-http2-4.1.108.Final.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.netty"
artifactId = "netty-transport-native-unix-common"
version = "4.1.108.Final"
path = "./lib/netty-transport-native-unix-common-4.1.108.Final.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "commons.pool.wso2"
artifactId = "commons-pool"
version = "1.5.6.wso2v1"
path = "./lib/commons-pool-1.5.6.wso2v1.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "org.bouncycastle"
artifactId = "bcprov-jdk18on"
version = "1.78"
path = "./lib/bcprov-jdk18on-1.78.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "org.bouncycastle"
artifactId = "bcpkix-jdk18on"
version = "1.78"
path = "./lib/bcpkix-jdk18on-1.78.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "org.bouncycastle"
artifactId = "bcutil-jdk18on"
version = "1.78"
path = "./lib/bcutil-jdk18on-1.78.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.netty"
artifactId = "netty-tcnative-classes"
version = "2.0.65.Final"
path = "./lib/netty-tcnative-classes-2.0.65.Final.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.netty"
artifactId = "netty-tcnative-boringssl-static"
version = "2.0.65.Final"
path = "./lib/netty-tcnative-boringssl-static-2.0.65.Final.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
path = "./lib/netty-tcnative-boringssl-static-2.0.65.Final-windows-x86_64.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
path = "./lib/netty-tcnative-boringssl-static-2.0.65.Final-linux-aarch_64.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
path = "./lib/netty-tcnative-boringssl-static-2.0.65.Final-linux-x86_64.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
path = "./lib/netty-tcnative-boringssl-static-2.0.65.Final-osx-aarch_64.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
path = "./lib/netty-tcnative-boringssl-static-2.0.65.Final-osx-x86_64.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "com.google.protobuf"
artifactId = "protobuf-java"
version = "3.25.5"
path = "./lib/protobuf-java-3.25.5.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "com.google.api.grpc"
artifactId = "proto-google-common-protos"
version = "1.17.0"
path = "./lib/proto-google-common-protos-1.17.0.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "org.ballerinalang"
artifactId = "formatter-core"
version = "2201.10.0"
path = "./lib/formatter-core-2201.10.0.jar"
version = "2201.10.0-20241025-103700-5c9e6a27"
path = "./lib/formatter-core-2201.10.0-20241025-103700-5c9e6a27.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "org.ballerinalang"
artifactId = "ballerina-parser"
version = "2201.10.0"
path = "./lib/ballerina-parser-2201.10.0.jar"
version = "2201.10.0-20241025-103700-5c9e6a27"
path = "./lib/ballerina-parser-2201.10.0-20241025-103700-5c9e6a27.jar"
2 changes: 1 addition & 1 deletion ballerina/CompilerPlugin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ id = "grpc-compiler-plugin"
class = "io.ballerina.stdlib.grpc.plugin.GrpcCompilerPlugin"

[[dependency]]
path = "../compiler-plugin/build/libs/grpc-compiler-plugin-1.12.1.jar"
path = "../compiler-plugin/build/libs/grpc-compiler-plugin-1.12.2-SNAPSHOT.jar"
Loading

0 comments on commit 3da09ef

Please sign in to comment.