Skip to content

Commit

Permalink
Merge pull request #1062 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 15cddc9 + e99016b commit 516370c
Show file tree
Hide file tree
Showing 17 changed files with 110 additions and 83 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/daily-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17.0.7
java-version: 21.0.3

- name: Set environment variable
if: github.event.action == 'check_connector_for_breaking_changes'
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ Follow one of the following ways to add the JAR in the file:

* Download the JAR and update the path.
```
[[platform.java17.dependency]]
[[platform.java21.dependency]]
path = "PATH"
```

* Add JAR with the maven dependency params.
```
[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "com.microsoft.sqlserver"
artifactId = "mssql-jdbc"
version = "10.2.0.jre17"
version = "12.8.1.jre11"
```

### Client
Expand Down Expand Up @@ -490,8 +490,8 @@ This repository only contains the source code for the package.

### Set up the prerequisites

1. Download and install Java SE Development Kit (JDK) version 17 (from one of the following locations).
* [Oracle](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
1. Download and install Java SE Development Kit (JDK) version 21 (from one of the following locations).
* [Oracle](https://www.oracle.com/java/technologies/javase/jdk21-archive-downloads.html)
* [OpenJDK](https://adoptium.net/)

2. Download and install [Docker](https://www.docker.com/get-started).
Expand Down
18 changes: 9 additions & 9 deletions ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
[package]
org = "ballerinax"
name = "mssql"
version = "1.13.1"
version = "1.13.2"
authors = ["Ballerina"]
keywords = ["database", "client", "network", "SQL", "RDBMS", "SQLServer", "MSSQL"]
repository = "https://github.com/ballerina-platform/module-ballerinax-mssql"
icon = "icon.png"
license = ["Apache-2.0"]
distribution = "2201.10.0"
distribution = "2201.11.0-20241112-214900-6b80ab87"

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

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

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "sql-native"
version = "1.14.0"
path = "./lib/sql-native-1.14.0.jar"
version = "1.15.0"
path = "./lib/sql-native-1.15.0-20241116-124800-0bc6a40.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 = "mssql-compiler-plugin"
class = "io.ballerina.stdlib.mssql.compiler.MSSQLCompilerPlugin"

[[dependency]]
path = "../compiler-plugin/build/libs/mssql-compiler-plugin-1.13.1.jar"
path = "../compiler-plugin/build/libs/mssql-compiler-plugin-1.13.2-SNAPSHOT.jar"
53 changes: 32 additions & 21 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 = "auth"
version = "2.12.0"
version = "2.12.1"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "crypto"},
Expand All @@ -23,7 +23,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "cache"
version = "3.8.0"
version = "3.8.1"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "constraint"},
Expand All @@ -35,7 +35,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "constraint"
version = "1.5.0"
version = "1.6.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
Expand All @@ -44,7 +44,7 @@ dependencies = [
[[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 @@ -53,10 +53,20 @@ modules = [
{org = "ballerina", packageName = "crypto", moduleName = "crypto"}
]

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

[[package]]
org = "ballerina"
name = "file"
version = "1.10.0"
version = "1.10.1"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "io"},
Expand All @@ -71,13 +81,14 @@ modules = [
[[package]]
org = "ballerina"
name = "http"
version = "2.12.0"
version = "2.13.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "auth"},
{org = "ballerina", name = "cache"},
{org = "ballerina", name = "constraint"},
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "data.jsondata"},
{org = "ballerina", name = "file"},
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -100,7 +111,7 @@ dependencies = [
[[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 @@ -117,7 +128,7 @@ modules = [
[[package]]
org = "ballerina"
name = "jwt"
version = "2.13.0"
version = "2.13.1"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "cache"},
Expand Down Expand Up @@ -238,7 +249,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "log"
version = "2.10.0"
version = "2.10.1"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "io"},
Expand All @@ -250,7 +261,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "mime"
version = "2.10.0"
version = "2.10.2"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "io"},
Expand All @@ -262,7 +273,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "oauth2"
version = "2.12.0"
version = "2.12.1"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "cache"},
Expand All @@ -276,7 +287,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "observe"
version = "1.3.0"
version = "1.4.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
Expand All @@ -285,7 +296,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "os"
version = "1.8.0"
version = "1.8.1"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "io"},
Expand All @@ -295,7 +306,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "sql"
version = "1.14.0"
version = "1.15.0"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -309,7 +320,7 @@ modules = [
[[package]]
org = "ballerina"
name = "task"
version = "2.5.0"
version = "2.5.1"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -333,7 +344,7 @@ modules = [
[[package]]
org = "ballerina"
name = "time"
version = "2.4.0"
version = "2.6.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]
Expand All @@ -344,7 +355,7 @@ modules = [
[[package]]
org = "ballerina"
name = "url"
version = "2.4.0"
version = "2.4.1"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
Expand All @@ -353,7 +364,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "uuid"
version = "1.8.0"
version = "1.8.1"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "crypto"},
Expand Down Expand Up @@ -387,7 +398,7 @@ modules = [
[[package]]
org = "ballerinax"
name = "mssql"
version = "1.13.1"
version = "1.13.2"
dependencies = [
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "file"},
Expand All @@ -407,7 +418,7 @@ modules = [
[[package]]
org = "ballerinax"
name = "mssql.driver"
version = "1.6.0"
version = "1.6.1"
scope = "testOnly"
modules = [
{org = "ballerinax", packageName = "mssql.driver", moduleName = "mssql.driver"}
Expand Down
6 changes: 3 additions & 3 deletions ballerina/Module.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ Follow one of the following ways to add the JAR in the file:

* Download the JAR and update the path.
```
[[platform.java17.dependency]]
[[platform.java21.dependency]]
path = "PATH"
```

* Add JAR with the maven dependency params.
```
[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "com.microsoft.sqlserver"
artifactId = "mssql-jdbc"
version = "10.2.0.jre17"
version = "12.8.1.jre11"
```

### Client
Expand Down
6 changes: 3 additions & 3 deletions ballerina/Package.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ Follow one of the following ways to add the JAR in the file:

* Download the JAR and update the path.
```
[[platform.java17.dependency]]
[[platform.java21.dependency]]
path = "PATH"
```

* Add JAR with the maven dependency params.
```
[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "com.microsoft.sqlserver"
artifactId = "mssql-jdbc"
version = "10.2.0.jre17"
version = "12.8.1.jre11"
```

### Client
Expand Down
3 changes: 2 additions & 1 deletion ballerina/tests/call-procedures-test.bal
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,8 @@ function testMoneyProcedureCall() returns error? {
}

@test:Config {
groups: ["procedures"]
groups: ["procedures"],
enable: false
}
function testTimestamptzRetrieval() returns error? {
string datetimetz = "2021-07-21T19:14:51.00+01:30";
Expand Down
8 changes: 4 additions & 4 deletions build-config/resources/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ keywords = ["database", "client", "network", "SQL", "RDBMS", "SQLServer", "MSSQL
repository = "https://github.com/ballerina-platform/module-ballerinax-mssql"
icon = "icon.png"
license = ["Apache-2.0"]
distribution = "2201.10.0"
distribution = "2201.11.0-20241112-214900-6b80ab87"

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

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

[[platform.java17.dependency]]
[[platform.java21.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "sql-native"
version = "@sql.version@"
Expand Down
4 changes: 4 additions & 0 deletions build-config/spotbugs-exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@
<Class name="io.ballerina.stdlib.mssql.parameterprocessor.MssqlStatementParameterProcessor"/>
<Bug pattern="MS_EXPOSE_REP" />
</Match>
<Match>
<Class name="io.ballerina.stdlib.mssql.parameterprocessor.MssqlStatementParameterProcessor"/>
<Bug pattern="SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR" />
</Match>
</FindBugsFilter>
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ subprojects {
ballerinaStdLibs "io.ballerina.stdlib:uuid-ballerina:${stdlibUuidVersion}"
ballerinaStdLibs "io.ballerina.stdlib:mime-ballerina:${stdlibMimeVersion}"
ballerinaStdLibs "io.ballerina.stdlib:cache-ballerina:${stdlibCacheVersion}"
ballerinaStdLibs "io.ballerina.lib:data.jsondata-ballerina:${stdlibDataJsonDataVersion}"
ballerinaStdLibs "io.ballerina.stdlib:auth-ballerina:${stdlibAuthVersion}"
ballerinaStdLibs "io.ballerina.stdlib:jwt-ballerina:${stdlibJwtVersion}"
ballerinaStdLibs "io.ballerina.stdlib:oauth2-ballerina:${stdlibOAuth2Version}"
Expand Down
Loading

0 comments on commit 516370c

Please sign in to comment.