Skip to content

Commit

Permalink
Merge pull request #573 from warunalakshitha/syncJava21
Browse files Browse the repository at this point in the history
Migrate to Java21
  • Loading branch information
warunalakshitha authored Nov 19, 2024
2 parents d4be2ed + 988e387 commit 3b6a952
Show file tree
Hide file tree
Showing 14 changed files with 93 additions and 68 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-timestamped-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: 17.0.7
java-version: 21.0.3
- name: Change to Timestamped Version
run: |
startTime=$(TZ="Asia/Kolkata" date +'%Y%m%d-%H%M00')
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: 17.0.7
java-version: 21.0.3
- name: Build with Gradle
env:
packageUser: ${{ github.actor }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: 17.0.7
java-version: 21.0.3
- name: Build with Gradle
env:
packageUser: ${{ github.actor }}
Expand All @@ -41,11 +41,11 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: 17.0.7
java-version: 21.0.3
- name: Build with Gradle
env:
packageUser: ${{ github.actor }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/trivy-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: 17.0.7
java-version: 21.0.3

- name: Build with Gradle
env:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The transaction internal module is a dependency module which required for Baller

### 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/)
* [OpenJDK](http://openjdk.java.net/install/index.html)

Expand Down
6 changes: 3 additions & 3 deletions build-config/resources/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
org = "ballerinai"
name = "transaction"
version = "@toml.version@"
distribution = "2201.10.0"
distribution = "2201.10.0-20241019-091600-89e54c08"

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

[[platform.java17.dependency]]
[[platform.java21.dependency]]
artifactId = "transaction"
version = "@project.version@"
path = "../transaction-native/build/libs/[email protected]@.jar"
Expand Down
9 changes: 5 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 Expand Up @@ -98,6 +98,7 @@ subprojects {
ballerinaStdLibs "io.ballerina.stdlib:file-ballerina:${stdlibFileVersion}"
ballerinaStdLibs "io.ballerina.stdlib:crypto-ballerina:${stdlibCryptoVersion}"
ballerinaStdLibs "io.ballerina.stdlib:auth-ballerina:${stdlibAuthVersion}"
ballerinaStdLibs "io.ballerina.lib:data.jsondata-ballerina:${stdlibDataJsonDataVersion}"
ballerinaStdLibs "io.ballerina.stdlib:mime-ballerina:${stdlibMimeVersion}"
ballerinaStdLibs "io.ballerina.stdlib:jwt-ballerina:${stdlibJwtVersion}"
ballerinaStdLibs "io.ballerina.stdlib:oauth2-ballerina:${stdlibOAuth2Version}"
Expand Down
44 changes: 25 additions & 19 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,31 @@ puppycrawlCheckstyleVersion=10.12.0
group=org.ballerinalang
version=1.10.1-SNAPSHOT

ballerinaLangVersion=2201.10.0
stdlibIoVersion=1.6.1
stdlibConstraintVersion=1.5.0
stdlibOsVersion=1.8.0
stdlibUuidVersion=1.8.0
stdlibHttpVersion=2.12.0
stdlibUrlVersion=2.4.0
stdlibLogVersion=2.10.0
stdlibTimeVersion=2.4.0
stdlibMimeVersion=2.10.0
stdlibAuthVersion=2.12.0
stdlibCacheVersion=3.8.0
stdlibCryptoVersion=2.7.2
stdlibFileVersion=1.10.0
stdlibTaskVersion=2.5.0
stdlibJwtVersion=2.13.0
stdlibOAuth2Version=2.12.0
spotbugsPluginVersion=6.0.18
shadowJarPluginVersion=8.1.1
downloadPluginVersion=5.4.0
releasePluginVersion=2.8.0

observeVersion=1.3.0
observeInternalVersion=1.3.0
ballerinaLangVersion=2201.11.0-20241117-133400-a3054b77
stdlibIoVersion=1.6.2-20241112-233100-995cf5f
stdlibConstraintVersion=1.6.0-20241113-090900-d276ad5
stdlibOsVersion=1.8.1-20241113-122000-cca973b
stdlibUuidVersion=1.8.1-20241113-154400-443c67b
stdlibHttpVersion=2.13.0-20241114-182900-7e9f66a
stdlibUrlVersion=2.4.1-20241113-073900-335ff51
stdlibLogVersion=2.10.1-20241113-120000-4577868
stdlibTimeVersion=2.6.0-20241113-073800-201b904
stdlibMimeVersion=2.10.2-20241113-154200-d953747
stdlibAuthVersion=2.12.1-20241113-162300-ded40eb
stdlibDataJsonDataVersion=0.3.0-20241114-143900-285d739
stdlibCacheVersion=3.8.1-20241113-125700-b75a1bf
stdlibCryptoVersion=2.7.3-20241113-081400-d015a39
stdlibFileVersion=1.10.1-20241113-151700-e1a2e38
stdlibTaskVersion=2.5.1-20241113-123500-f905281
stdlibJwtVersion=2.13.1-20241113-162400-b59ccfa
stdlibOAuth2Version=2.12.1-20241113-162400-4c6ddfe

observeVersion=1.4.0-20241113-092000-b83ae74
observeInternalVersion=1.3.1-20241113-101700-265054d

ballerinaGradlePluginVersion=2.0.1
10 changes: 5 additions & 5 deletions transaction-ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
org = "ballerinai"
name = "transaction"
version = "0.0.0"
distribution = "2201.10.0"
distribution = "2201.10.0-20241019-091600-89e54c08"

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

[[platform.java17.dependency]]
[[platform.java21.dependency]]
artifactId = "transaction"
version = "1.10.0"
path = "../transaction-native/build/libs/transaction-native-1.10.0.jar"
version = "1.10.1-SNAPSHOT"
path = "../transaction-native/build/libs/transaction-native-1.10.1-SNAPSHOT.jar"
groupId = "ballerina"
46 changes: 28 additions & 18 deletions transaction-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"
dependencies = [
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -22,7 +22,7 @@ dependencies = [
[[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,24 +36,33 @@ modules = [
[[package]]
org = "ballerina"
name = "constraint"
version = "1.5.0"
version = "1.6.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "crypto"
version = "2.7.2"
version = "2.7.3"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "time"}
]

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

[[package]]
org = "ballerina"
name = "file"
version = "1.10.0"
version = "1.10.1"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -64,12 +73,13 @@ dependencies = [
[[package]]
org = "ballerina"
name = "http"
version = "2.12.1"
version = "2.13.0"
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 @@ -96,7 +106,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 @@ -116,7 +126,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 @@ -234,7 +244,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 @@ -248,7 +258,7 @@ modules = [
[[package]]
org = "ballerina"
name = "mime"
version = "2.10.0"
version = "2.10.2"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -259,7 +269,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 @@ -272,15 +282,15 @@ dependencies = [
[[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 @@ -289,7 +299,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 @@ -315,7 +325,7 @@ modules = [
[[package]]
org = "ballerina"
name = "time"
version = "2.4.0"
version = "2.6.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]
Expand All @@ -326,15 +336,15 @@ modules = [
[[package]]
org = "ballerina"
name = "url"
version = "2.4.0"
version = "2.4.1"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "uuid"
version = "1.8.0"
version = "1.8.1"
dependencies = [
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "jballerina.java"},
Expand Down
2 changes: 2 additions & 0 deletions transaction-ballerina/tests/transactional_expr.bal
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import ballerina/test;

@test:Config {
enable:false
}
function testTransactionalFalse() {
test:assertEquals(false, transactional);
Expand All @@ -41,6 +42,7 @@ function testTransactionalFalse2() returns error? {
}

@test:Config {
enable:false
}
function testTransactionalFalse3() returns error? {
transaction {
Expand Down
7 changes: 5 additions & 2 deletions transaction-native/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@ tasks.withType(Checkstyle) {
checkstyleMain.dependsOn(":build-config: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
Loading

0 comments on commit 3b6a952

Please sign in to comment.