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 #1279

Merged
merged 13 commits into from
Nov 18, 2024
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ This repository only contains the source code for the package.

### Setting up the prerequisites

1. Download and install Java SE Development Kit (JDK) version 17 (from one of the following locations).
1. 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
24 changes: 12 additions & 12 deletions ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
[package]
org = "ballerina"
name = "udp"
version = "1.11.0"
version = "1.11.1"
authors = ["Ballerina"]
keywords = ["UDP", "datagram", "transport"]
repository = "https://github.com/ballerina-platform/module-ballerina-udp"
icon = "icon.png"
license = ["Apache-2.0"]
distribution = "2201.10.0"

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

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "udp-native"
version = "1.11.0"
path = "../native/build/libs/udp-native-1.11.0.jar"
version = "1.11.1"
path = "../native/build/libs/udp-native-1.11.1-SNAPSHOT.jar"

[[platform.java17.dependency]]
path = "../test-utils/build/libs/udp-test-utils-1.11.0.jar"
[[platform.java21.dependency]]
path = "../test-utils/build/libs/udp-test-utils-1.11.1-SNAPSHOT.jar"
scope = "testOnly"

[[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-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-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-resolver"
version = "4.1.108.Final"
Expand Down
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 = "udp-plugin"
class = "io.ballerina.stdlib.udp.compiler.UdpCompilerPlugin"

[[dependency]]
path = "../compiler-plugin/build/libs/udp-compiler-plugin-1.11.0.jar"
path = "../compiler-plugin/build/libs/udp-compiler-plugin-1.11.1-SNAPSHOT.jar"
10 changes: 5 additions & 5 deletions ballerina/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

[ballerina]
dependencies-toml-version = "2"
distribution-version = "2201.10.0"
distribution-version = "2201.11.0-20241112-214900-6b80ab87"

[[package]]
org = "ballerina"
name = "io"
version = "1.6.0"
version = "1.6.2"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
Expand Down Expand Up @@ -75,7 +75,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "log"
version = "2.10.0"
version = "2.10.1"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "io"},
Expand All @@ -90,7 +90,7 @@ modules = [
[[package]]
org = "ballerina"
name = "observe"
version = "1.3.0"
version = "1.4.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
Expand All @@ -113,7 +113,7 @@ modules = [
[[package]]
org = "ballerina"
name = "udp"
version = "1.11.0"
version = "1.11.1"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
Expand Down
16 changes: 8 additions & 8 deletions build-config/resources/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,44 +9,44 @@ icon = "icon.png"
license = ["Apache-2.0"]
distribution = "2201.10.0"

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

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "udp-native"
version = "@toml.version@"
path = "../native/build/libs/[email protected]@.jar"

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

[[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-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-common"
version = "@netty.version@"
path = "./lib/[email protected]@.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.netty"
artifactId = "netty-resolver"
version = "@netty.version@"
Expand Down
9 changes: 4 additions & 5 deletions build-config/spotbugs-exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@
</Or>
<Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON"/>
</Match>

<Match>
<Class name="io.ballerina.stdlib.udp.UdpCallback"/>
<Bug pattern="EI_EXPOSE_REP2"/>
</Match>
<Match>
<Class name="io.ballerina.stdlib.udp.UdpService"/>
<Bug pattern="EI_EXPOSE_REP, EI_EXPOSE_REP2"/>
</Match>
<Match>
<Class name="io.ballerina.stdlib.udp.UdpClientHandler"/>
<Bug pattern="EI_EXPOSE_REP2"/>
</Match>
</FindBugsFilter>
7 changes: 5 additions & 2 deletions compiler-plugin-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ checkstyle {
checkstyleTest.dependsOn(":checkstyle:downloadCheckstyleRuleFiles")

spotbugsTest {
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")
reports {
html.enabled true
Expand Down
7 changes: 5 additions & 2 deletions compiler-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@ checkstyle {
checkstyleMain.dependsOn(":checkstyle:downloadCheckstyleRuleFiles")

spotbugsMain {
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")
reports {
html.enabled true
Expand Down
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
org.gradle.caching=true
group=io.ballerina.stdlib
version=1.11.1-SNAPSHOT
ballerinaLangVersion=2201.10.0
ballerinaLangVersion=2201.11.0-20241112-214900-6b80ab87

puppycrawlCheckstyleVersion=10.12.0
githubJohnrengelmanShadowVersion=8.1.1
checkstyleToolVersion=7.8.2
githubSpotbugsVersion=5.0.14
githubSpotbugsVersion=6.0.18
testngVersion=7.6.1
nettyVersion=4.1.108.Final
underCouchDownloadVersion=5.4.0
Expand All @@ -16,7 +16,7 @@ ballerinaGradlePluginVersion=2.0.1
gsonVersion=2.8.8

# Dependencies
stdlibIoVersion=1.6.0
stdlibLogVersion=2.10.0
observeVersion=1.3.0
observeInternalVersion=1.3.0
stdlibIoVersion=1.6.2-20241112-233100-995cf5f
stdlibLogVersion=2.10.1-20241113-120000-4577868
observeVersion=1.4.0-20241113-092000-b83ae74
observeInternalVersion=1.3.1-20241113-101700-265054d
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 @@ compileJava {
}

spotbugsMain {
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")
reports {
html.enabled true
Expand Down
Loading
Loading