Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Java 21 #243

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -28,7 +28,7 @@ jobs:
- name: Set up GraalVM
uses: graalvm/setup-graalvm@v1
with:
java-version: "17"
java-version: "21"
distribution: "graalvm-community"
set-java-home: true
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ This repository only contains the source code for the package.

### Prerequisites

1. Download and install Java SE Development Kit (JDK) version 17. You can download it from either of the following sources:
1. Download and install Java SE Development Kit (JDK) version 21. You can download it from either of the following sources:

* [Oracle JDK](https://www.oracle.com/java/technologies/downloads/)
* [OpenJDK](https://adoptium.net/)
Expand Down
32 changes: 16 additions & 16 deletions ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ icon = "icon.png"
repository = "https://github.com/ballerina-platform/module-ballerinax-redis"
license = ["Apache-2.0"]

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

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.ballerina.lib"
artifactId = "redis-native"
module = "redis-native"
version="3.0.3-SNAPSHOT"
path = "../native/build/libs/redis-native-3.0.3-SNAPSHOT.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.lettuce"
artifactId = "lettuce-core"
version = "6.3.1.RELEASE"
Expand All @@ -29,79 +29,79 @@ groupId = "org.apache.commons"
artifactId = "commons-pool2"
version = "2.11.1"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "com.google.guava"
artifactId = "guava"
version = "32.0.0-jre"
path = "./lib/guava-32.0.0-jre.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "commons-io"
artifactId = "commons-io"
version = "2.7"
path = "./lib/commons-io-2.7.jar"

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

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

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

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

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

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

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

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

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

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.projectreactor"
artifactId = "reactor-core"
version = "3.6.2"
path = "./lib/reactor-core-3.6.2.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "org.reactivestreams"
artifactId = "reactive-streams"
version = "1.0.2"
Expand Down
2 changes: 1 addition & 1 deletion ballerina/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ ballerina {
module = packageName
testCoverageParam = "--code-coverage --coverage-format=xml"
isConnector = true
platform = "java17"
platform = "java21"
}

configurations {
Expand Down
32 changes: 16 additions & 16 deletions build-config/resources/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ icon = "icon.png"
repository = "https://github.com/ballerina-platform/module-ballerinax-redis"
license = ["Apache-2.0"]

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

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.ballerina.lib"
artifactId = "redis-native"
module = "redis-native"
version="@project.version@"
path = "../native/build/libs/[email protected]@.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.lettuce"
artifactId = "lettuce-core"
version = "@lettuce.version@"
Expand All @@ -29,79 +29,79 @@ groupId = "org.apache.commons"
artifactId = "commons-pool2"
version = "@commons.pool2.version@"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "com.google.guava"
artifactId = "guava"
version = "@guava.version@"
path = "./lib/[email protected]@.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "commons-io"
artifactId = "commons-io"
version = "@commons.io.version@"
path = "./lib/[email protected]@.jar"

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

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

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

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

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

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.netty"
artifactId = "netty-transport-native-kqueue"
version = "@netty.version@"
path = "./lib/[email protected]@.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.netty"
artifactId = "netty-transport-native-epoll"
version = "@netty.version@"
path = "./lib/[email protected]@.jar"

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

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

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.projectreactor"
artifactId = "reactor-core"
version = "@reactor-core.version@"
path = "./lib/[email protected]@.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "org.reactivestreams"
artifactId = "reactive-streams"
version = "@reactive-streams.version@"
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
org.gradle.caching=true
group=io.ballerina.lib.redis
version=3.0.3-SNAPSHOT
ballerinaLangVersion=2201.8.0
ballerinaLangVersion=2201.11.0-20241112-214900-6b80ab87

checkstylePluginVersion=10.12.1
spotbugsPluginVersion=5.0.14
spotbugsPluginVersion=6.0.18
shadowJarPluginVersion=8.1.1
downloadPluginVersion=5.4.0
releasePluginVersion=2.8.0
ballerinaGradlePluginVersion=2.2.1
ballerinaGradlePluginVersion=2.2.4

lettuceCoreVersion=6.3.1.RELEASE
commonsPool2Version=2.11.1
Expand Down
7 changes: 5 additions & 2 deletions native/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,11 @@ test {

spotbugsMain {
ignoreFailures = true
effort = "max"
reportLevel = "low"
def classLoader = plugins["com.github.spotbugs"].class.classLoader
def SpotBugsConfidence = classLoader.findLoadedClass("com.github.spotbugs.snom.Confidence")
def SpotBugsEffort = classLoader.findLoadedClass("com.github.spotbugs.snom.Effort")
effort = SpotBugsEffort.MAX
reportLevel = SpotBugsConfidence.LOW
reportsDir = file("$project.buildDir/reports/spotbugs")
def excludeFile = file("${rootDir}/build-config/spotbugs-exclude.xml")
if (excludeFile.exists()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@

package io.ballerina.lib.redis.utils;

import io.ballerina.runtime.api.PredefinedTypes;
import io.ballerina.runtime.api.creators.ErrorCreator;
import io.ballerina.runtime.api.creators.TypeCreator;
import io.ballerina.runtime.api.creators.ValueCreator;
import io.ballerina.runtime.api.types.PredefinedTypes;
import io.ballerina.runtime.api.utils.StringUtils;
import io.ballerina.runtime.api.values.BArray;
import io.ballerina.runtime.api.values.BError;
Expand Down
Loading