Skip to content

Commit 4d56eac

Browse files
Merge pull request #854 from ravinperera00/java21_sync
Migrate to Java 21
2 parents 70a8f4e + f2d058c commit 4d56eac

File tree

14 files changed

+69
-81
lines changed

14 files changed

+69
-81
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ This repository only contains the source code for the package.
345345

346346
### Set up the prerequisites
347347

348-
1. Download and install Java SE Development Kit (JDK) version 17 (from one of the following locations).
348+
1. Download and install Java SE Development Kit (JDK) version 21 (from one of the following locations).
349349

350350
* [Oracle](https://www.oracle.com/java/technologies/downloads/)
351351

ballerina/Ballerina.toml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,50 @@
11
[package]
22
org = "ballerina"
33
name = "email"
4-
version = "2.10.0"
4+
version = "2.10.1"
55
authors = ["Ballerina"]
66
keywords = ["email", "SMTP", "POP", "POP3", "IMAP", "mail"]
77
repository = "https://github.com/ballerina-platform/module-ballerina-email"
88
icon = "icon.png"
99
license = ["Apache-2.0"]
1010
distribution = "2201.10.0"
1111

12-
[platform.java17]
12+
[platform.java21]
1313
graalvmCompatible = true
1414

15-
[[platform.java17.dependency]]
15+
[[platform.java21.dependency]]
1616
groupId = "com.sun.mail"
1717
artifactId = "javax.mail"
1818
version = "1.6.2"
1919
path = "./lib/javax.mail-1.6.2.jar"
2020

21-
[[platform.java17.dependency]]
21+
[[platform.java21.dependency]]
2222
groupId = "com.icegreen"
2323
artifactId = "greenmail"
2424
version = "1.5.11"
2525
path = "./lib/greenmail-1.5.11.jar"
2626

27-
[[platform.java17.dependency]]
27+
[[platform.java21.dependency]]
2828
groupId = "org.jvnet.mimepull"
2929
artifactId = "mimepull"
3030
version = "1.9.11"
3131
path = "./lib/mimepull-1.9.11.jar"
3232

33-
[[platform.java17.dependency]]
33+
[[platform.java21.dependency]]
3434
groupId = "javax.activation"
3535
artifactId = "activation"
3636
version = "1.1.1"
3737
path = "./lib/activation-1.1.1.jar"
3838

39-
[[platform.java17.dependency]]
39+
[[platform.java21.dependency]]
4040
groupId = "io.ballerina.stdlib"
4141
artifactId = "email-native"
42-
version = "2.10.0"
43-
path = "../native/build/libs/email-native-2.10.0.jar"
42+
version = "2.10.1"
43+
path = "../native/build/libs/email-native-2.10.1-SNAPSHOT.jar"
4444

45-
[[platform.java17.dependency]]
45+
[[platform.java21.dependency]]
4646
groupId = "io.ballerina.stdlib"
4747
artifactId = "email-test-utils"
48-
version = "2.10.0"
49-
path = "../test-utils/build/libs/email-test-utils-2.10.0.jar"
48+
version = "2.10.1"
49+
path = "../test-utils/build/libs/email-test-utils-2.10.1-SNAPSHOT.jar"
5050
scope = "testOnly"

ballerina/CompilerPlugin.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ id = "email-compiler-plugin"
33
class = "io.ballerina.stdlib.email.compiler.EmailCompilerPlugin"
44

55
[[dependency]]
6-
path = "../compiler-plugin/build/libs/email-compiler-plugin-2.10.0.jar"
6+
path = "../compiler-plugin/build/libs/email-compiler-plugin-2.10.1-SNAPSHOT.jar"

ballerina/Dependencies.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55

66
[ballerina]
77
dependencies-toml-version = "2"
8-
distribution-version = "2201.10.0"
8+
distribution-version = "2201.11.0-20241112-214900-6b80ab87"
99

1010
[[package]]
1111
org = "ballerina"
1212
name = "email"
13-
version = "2.10.0"
13+
version = "2.10.1"
1414
dependencies = [
1515
{org = "ballerina", name = "jballerina.java"},
1616
{org = "ballerina", name = "lang.runtime"},
@@ -27,7 +27,7 @@ modules = [
2727
[[package]]
2828
org = "ballerina"
2929
name = "io"
30-
version = "1.6.0"
30+
version = "1.6.2"
3131
dependencies = [
3232
{org = "ballerina", name = "jballerina.java"},
3333
{org = "ballerina", name = "lang.value"}
@@ -129,7 +129,7 @@ dependencies = [
129129
[[package]]
130130
org = "ballerina"
131131
name = "log"
132-
version = "2.10.0"
132+
version = "2.10.1"
133133
dependencies = [
134134
{org = "ballerina", name = "io"},
135135
{org = "ballerina", name = "jballerina.java"},
@@ -143,7 +143,7 @@ modules = [
143143
[[package]]
144144
org = "ballerina"
145145
name = "mime"
146-
version = "2.10.0"
146+
version = "2.10.2"
147147
dependencies = [
148148
{org = "ballerina", name = "io"},
149149
{org = "ballerina", name = "jballerina.java"},
@@ -157,15 +157,15 @@ modules = [
157157
[[package]]
158158
org = "ballerina"
159159
name = "observe"
160-
version = "1.3.0"
160+
version = "1.4.0"
161161
dependencies = [
162162
{org = "ballerina", name = "jballerina.java"}
163163
]
164164

165165
[[package]]
166166
org = "ballerina"
167167
name = "task"
168-
version = "2.5.0"
168+
version = "2.5.1"
169169
dependencies = [
170170
{org = "ballerina", name = "jballerina.java"},
171171
{org = "ballerina", name = "time"}
@@ -191,7 +191,7 @@ modules = [
191191
[[package]]
192192
org = "ballerina"
193193
name = "time"
194-
version = "2.4.0"
194+
version = "2.6.0"
195195
dependencies = [
196196
{org = "ballerina", name = "jballerina.java"}
197197
]

build-config/resources/Ballerina.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,40 +9,40 @@ icon = "icon.png"
99
license = ["Apache-2.0"]
1010
distribution = "2201.10.0"
1111

12-
[platform.java17]
12+
[platform.java21]
1313
graalvmCompatible = true
1414

15-
[[platform.java17.dependency]]
15+
[[platform.java21.dependency]]
1616
groupId = "com.sun.mail"
1717
artifactId = "javax.mail"
1818
version = "1.6.2"
1919
path = "./lib/javax.mail-1.6.2.jar"
2020

21-
[[platform.java17.dependency]]
21+
[[platform.java21.dependency]]
2222
groupId = "com.icegreen"
2323
artifactId = "greenmail"
2424
version = "1.5.11"
2525
path = "./lib/greenmail-1.5.11.jar"
2626

27-
[[platform.java17.dependency]]
27+
[[platform.java21.dependency]]
2828
groupId = "org.jvnet.mimepull"
2929
artifactId = "mimepull"
3030
version = "1.9.11"
3131
path = "./lib/mimepull-1.9.11.jar"
3232

33-
[[platform.java17.dependency]]
33+
[[platform.java21.dependency]]
3434
groupId = "javax.activation"
3535
artifactId = "activation"
3636
version = "1.1.1"
3737
path = "./lib/activation-1.1.1.jar"
3838

39-
[[platform.java17.dependency]]
39+
[[platform.java21.dependency]]
4040
groupId = "io.ballerina.stdlib"
4141
artifactId = "email-native"
4242
version = "@toml.version@"
4343
path = "../native/build/libs/[email protected]@.jar"
4444

45-
[[platform.java17.dependency]]
45+
[[platform.java21.dependency]]
4646
groupId = "io.ballerina.stdlib"
4747
artifactId = "email-test-utils"
4848
version = "@toml.version@"

build-config/spotbugs-exclude.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,8 @@
2929
<Class name="io.ballerina.stdlib.email.server.EmailConsumer"/>
3030
<Bug pattern="EI_EXPOSE_REP2" />
3131
</Match>
32+
<Match>
33+
<Class name="io.ballerina.stdlib.email.server.EmailConsumer"/>
34+
<Bug pattern="CT_CONSTRUCTOR_THROW" />
35+
</Match>
3236
</FindBugsFilter>

compiler-plugin-tests/build.gradle

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,11 @@ checkstyle {
5050
checkstyleTest.dependsOn(":checkstyle:downloadCheckstyleRuleFiles")
5151

5252
spotbugsTest {
53-
effort "max"
54-
reportLevel "low"
53+
def classLoader = plugins["com.github.spotbugs"].class.classLoader
54+
def SpotBugsConfidence = classLoader.findLoadedClass("com.github.spotbugs.snom.Confidence")
55+
def SpotBugsEffort = classLoader.findLoadedClass("com.github.spotbugs.snom.Effort")
56+
effort = SpotBugsEffort.MAX
57+
reportLevel = SpotBugsConfidence.LOW
5558
reportsDir = file("$project.buildDir/reports/spotbugs")
5659
reports {
5760
html.enabled true

compiler-plugin/build.gradle

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,11 @@ tasks.withType(Checkstyle) {
4646
checkstyleMain.dependsOn(":checkstyle:downloadCheckstyleRuleFiles")
4747

4848
spotbugsMain {
49-
effort "max"
50-
reportLevel "low"
49+
def classLoader = plugins["com.github.spotbugs"].class.classLoader
50+
def SpotBugsConfidence = classLoader.findLoadedClass("com.github.spotbugs.snom.Confidence")
51+
def SpotBugsEffort = classLoader.findLoadedClass("com.github.spotbugs.snom.Effort")
52+
effort = SpotBugsEffort.MAX
53+
reportLevel = SpotBugsConfidence.LOW
5154
reportsDir = file("$project.buildDir/reports/spotbugs")
5255
reports {
5356
html.enabled true

gradle.properties

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ mimepullVersion=1.9.11
99
javaxActivationVersion=1.1.1
1010
puppycrawlCheckstyleVersion=10.12.0
1111
checkstylePluginVersion=10.12.0
12-
githubSpotbugsVersion=5.0.14
12+
githubSpotbugsVersion=6.0.18
1313
githubJohnrengelmanShadowVersion=8.1.1
1414
underCouchDownloadVersion=5.4.0
1515
researchgateReleaseVersion=2.8.0
1616
ballerinaGradlePluginVersion=2.0.1
1717

18-
ballerinaLangVersion=2201.10.0
19-
stdlibTaskVersion=2.5.0
20-
stdlibMimeVersion=2.10.0
21-
stdlibFileVersion=1.10.0
22-
stdlibTimeVersion=2.4.0
23-
stdlibLogVersion=2.10.0
24-
stdlibOsVersion=1.8.0
25-
stdlibIoVersion=1.6.0
26-
observeVersion=1.3.0
27-
observeInternalVersion=1.3.0
18+
ballerinaLangVersion=2201.11.0-20241112-214900-6b80ab87
19+
stdlibTaskVersion=2.5.1-20241113-123500-f905281
20+
stdlibMimeVersion=2.10.2-20241113-154200-d953747
21+
stdlibFileVersion=1.10.1-20241113-151700-e1a2e38
22+
stdlibTimeVersion=2.6.0-20241113-073800-201b904
23+
stdlibLogVersion=2.10.1-20241113-120000-4577868
24+
stdlibOsVersion=1.8.1-20241113-122000-cca973b
25+
stdlibIoVersion=1.6.2-20241112-233100-995cf5f
26+
observeVersion=1.4.0-20241113-092000-b83ae74
27+
observeInternalVersion=1.3.1-20241113-101700-265054d

native/build.gradle

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,11 @@ dependencies {
4242

4343
spotbugsMain {
4444
ignoreFailures = true
45-
effort = "max"
46-
reportLevel = "low"
45+
def classLoader = plugins["com.github.spotbugs"].class.classLoader
46+
def SpotBugsConfidence = classLoader.findLoadedClass("com.github.spotbugs.snom.Confidence")
47+
def SpotBugsEffort = classLoader.findLoadedClass("com.github.spotbugs.snom.Effort")
48+
effort = SpotBugsEffort.MAX
49+
reportLevel = SpotBugsConfidence.LOW
4750
reportsDir = file("$project.buildDir/reports/spotbugs")
4851
def excludeFile = file("${rootDir}/build-config/spotbugs-exclude.xml")
4952
if (excludeFile.exists()) {

0 commit comments

Comments
 (0)