Skip to content

Commit

Permalink
Migrate to Java 21
Browse files Browse the repository at this point in the history
  • Loading branch information
warunalakshitha committed Sep 27, 2024
1 parent 3f41af9 commit 85c0fbb
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ This repository only contains the source code for the module.

### Set 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
10 changes: 5 additions & 5 deletions ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
[package]
org = "ballerina"
name = "jballerina.java.arrays"
version = "1.4.0"
version = "1.4.1"
authors = ["Ballerina"]
keywords = ["java", "arrays"]
repository = "https://github.com/ballerina-platform/module-ballerina-jballerina.java.arrays"
icon = "icon.png"
license = ["Apache-2.0"]
distribution = "2201.8.0"

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

[[platform.java17.dependency]]
path = "../test-utils/build/libs/jballerina.java.arrays-test-utils-1.4.0.jar"
version = "1.4.0"
[[platform.java21.dependency]]
path = "../test-utils/build/libs/jballerina.java.arrays-test-utils-1.4.1-SNAPSHOT.jar"
version = "1.4.1-SNAPSHOT"
scope = "testOnly"
31 changes: 29 additions & 2 deletions ballerina/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[ballerina]
dependencies-toml-version = "2"
distribution-version = "2201.8.0"
distribution-version = "2201.10.0-SNAPSHOT"

[[package]]
org = "ballerina"
Expand All @@ -18,7 +18,7 @@ modules = [
[[package]]
org = "ballerina"
name = "jballerina.java.arrays"
version = "1.4.0"
version = "1.4.1"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "test"}
Expand All @@ -27,6 +27,26 @@ modules = [
{org = "ballerina", packageName = "jballerina.java.arrays", moduleName = "jballerina.java.arrays"}
]

[[package]]
org = "ballerina"
name = "lang.__internal"
version = "0.0.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.object"}
]

[[package]]
org = "ballerina"
name = "lang.array"
version = "0.0.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.__internal"}
]

[[package]]
org = "ballerina"
name = "lang.error"
Expand All @@ -36,13 +56,20 @@ dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "lang.object"
version = "0.0.0"
scope = "testOnly"

[[package]]
org = "ballerina"
name = "test"
version = "0.0.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.array"},
{org = "ballerina", name = "lang.error"}
]
modules = [
Expand Down
4 changes: 2 additions & 2 deletions build-config/resources/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ icon = "icon.png"
license = ["Apache-2.0"]
distribution = "2201.8.0"

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

[[platform.java17.dependency]]
[[platform.java21.dependency]]
path = "../test-utils/build/libs/jballerina.java.arrays-test-utils-@project.version@.jar"
version = "@project.version@"
scope = "testOnly"
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
org.gradle.caching=true
group=io.ballerina.stdlib
version=1.4.1-SNAPSHOT
ballerinaLangVersion=2201.8.0
githubSpotbugsVersion=5.0.14
ballerinaLangVersion=2201.10.0-20240926-231800-8a5a4343
githubSpotbugsVersion=6.0.18
githubJohnrengelmanShadowVersion=8.1.1
underCouchDownloadVersion=5.4.0
researchgateReleaseVersion=2.8.0
Expand Down
7 changes: 5 additions & 2 deletions test-utils/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@ checkstyle {
checkstyleMain.dependsOn(":checkstyle:downloadMultipleFiles")

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

0 comments on commit 85c0fbb

Please sign in to comment.