Skip to content

Commit

Permalink
Merge pull request #1475 from ravinperera00/java21_sync
Browse files Browse the repository at this point in the history
Migrate to Java 21
  • Loading branch information
warunalakshitha authored Nov 19, 2024
2 parents cc8c12c + 3d866ce commit 748a865
Show file tree
Hide file tree
Showing 32 changed files with 641 additions and 622 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ This repository only contains the source code for the module.

### 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
38 changes: 19 additions & 19 deletions ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,81 +9,81 @@ icon = "icon.png"
license = ["Apache-2.0"]
distribution = "2201.11.0"

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

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

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "http-native"
version = "2.13.0"
path = "./lib/http-native-2.13.0-20241113-151000-3feb04b.jar"
path = "./lib/http-native-2.13.0-20241114-182900-7e9f66a.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "mime-native"
version = "2.10.0"
path = "./lib/mime-native-2.10.0.jar"
version = "2.10.2"
path = "./lib/mime-native-2.10.2-20241113-154200-d953747.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "constraint-native"
version = "1.5.0"
path = "./lib/constraint-native-1.5.0.jar"
version = "1.6.0"
path = "./lib/constraint-native-1.6.0-20241113-090900-d276ad5.jar"

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

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

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

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

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

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

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

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

[[platform.java17.dependency]]
[[platform.java21.dependency]]
path = "../test-utils/build/libs/websocket-test-utils-2.13.0-SNAPSHOT.jar"
scope = "testOnly"
32 changes: 16 additions & 16 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.11.0-20241008-112400-81975006"
distribution-version = "2201.11.0-20241112-214900-6b80ab87"

[[package]]
org = "ballerina"
name = "auth"
version = "2.12.0"
version = "2.12.1"
dependencies = [
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -25,7 +25,7 @@ modules = [
[[package]]
org = "ballerina"
name = "cache"
version = "3.8.0"
version = "3.8.1"
dependencies = [
{org = "ballerina", name = "constraint"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -36,7 +36,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "constraint"
version = "1.5.0"
version = "1.6.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]
Expand All @@ -47,7 +47,7 @@ modules = [
[[package]]
org = "ballerina"
name = "crypto"
version = "2.7.2"
version = "2.7.3"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "time"}
Expand All @@ -65,7 +65,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "file"
version = "1.10.0"
version = "1.10.1"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
Expand Down Expand Up @@ -109,7 +109,7 @@ modules = [
[[package]]
org = "ballerina"
name = "io"
version = "1.6.1"
version = "1.6.2"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.value"}
Expand All @@ -129,7 +129,7 @@ modules = [
[[package]]
org = "ballerina"
name = "jwt"
version = "2.13.0"
version = "2.13.1"
dependencies = [
{org = "ballerina", name = "cache"},
{org = "ballerina", name = "crypto"},
Expand Down Expand Up @@ -242,7 +242,7 @@ modules = [
[[package]]
org = "ballerina"
name = "log"
version = "2.10.0"
version = "2.10.1"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -256,7 +256,7 @@ modules = [
[[package]]
org = "ballerina"
name = "mime"
version = "2.10.1"
version = "2.10.2"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -267,7 +267,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "oauth2"
version = "2.12.0"
version = "2.12.1"
dependencies = [
{org = "ballerina", name = "cache"},
{org = "ballerina", name = "crypto"},
Expand All @@ -283,15 +283,15 @@ modules = [
[[package]]
org = "ballerina"
name = "observe"
version = "1.3.0"
version = "1.4.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "os"
version = "1.8.0"
version = "1.8.1"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"}
Expand All @@ -300,7 +300,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "task"
version = "2.5.0"
version = "2.5.1"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "time"}
Expand All @@ -323,7 +323,7 @@ modules = [
[[package]]
org = "ballerina"
name = "time"
version = "2.5.0"
version = "2.6.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]
Expand All @@ -334,7 +334,7 @@ modules = [
[[package]]
org = "ballerina"
name = "url"
version = "2.4.0"
version = "2.4.1"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]
Expand Down
28 changes: 14 additions & 14 deletions build-config/resources/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,81 +9,81 @@ icon = "icon.png"
license = ["Apache-2.0"]
distribution = "2201.11.0"

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

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

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "http-native"
version = "@http.version@"
path = "./lib/http-native-@stdlib.httpnative.version@.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "mime-native"
version = "@mime.version@"
path = "./lib/mime-native-@stdlib.mimenative.version@.jar"

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "constraint-native"
version = "@constraint.version@"
path = "./lib/constraint-native-@stdlib.constraintnative.version@.jar"

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

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

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

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

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

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

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

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

[[platform.java17.dependency]]
[[platform.java21.dependency]]
path = "../test-utils/build/libs/websocket-test-utils-@project.version@.jar"
scope = "testOnly"
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
*/

plugins {
id "com.github.spotbugs" version "5.0.14"
id "com.github.johnrengelman.shadow" version "8.1.1"
id "de.undercouch.download" version "5.4.0"
id "net.researchgate.release" version "2.8.0"
id "com.github.spotbugs" version "${spotbugsPluginVersion}"
id "com.github.johnrengelman.shadow" version "${shadowJarPluginVersion}"
id "de.undercouch.download" version "${downloadPluginVersion}"
id "net.researchgate.release" version "${releasePluginVersion}"
}

ext.ballerinaLangVersion = project.ballerinaLangVersion
Expand Down
7 changes: 5 additions & 2 deletions compiler-plugin-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,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 @@ -46,8 +46,11 @@ tasks.withType(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
Loading

0 comments on commit 748a865

Please sign in to comment.