Skip to content

Commit

Permalink
Migrate to Java 17
Browse files Browse the repository at this point in the history
  • Loading branch information
gabilang committed Jun 25, 2023
1 parent ce67b9f commit b14288e
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 30 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 @@ -18,11 +18,11 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 11
java-version: 17
- 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/central-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 11
java-version: 17
- name: Build with Gradle
env:
packageUser: ${{ github.actor }}
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@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 11
java-version: 17
- 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 @@ -9,11 +9,11 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 11
java-version: 17
- name: Build with Gradle
env:
packageUser: ${{ github.actor }}
Expand All @@ -31,11 +31,11 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 11
java-version: 17
- 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@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 11
java-version: 17
- name: Build with Gradle
env:
packageUser: ${{ github.actor }}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,9 @@ This repository only contains the source code for the package.

### Set up the prerequisites

1. Download and install Java SE Development Kit (JDK) version 11 (from one of the following locations).
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-jdk11-downloads.html)
* [Oracle](https://www.oracle.com/java/technologies/javase-jdk17-downloads.html)

* [OpenJDK](https://adoptium.net/)

Expand Down
4 changes: 2 additions & 2 deletions build-config/checkstyle/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ apply plugin: 'java'

task downloadCheckstyleRuleFiles(type: Download) {
src([
'https://raw.githubusercontent.com/wso2/code-quality-tools/v1.3/checkstyle/checkstyle.xml',
'https://raw.githubusercontent.com/wso2/code-quality-tools/v1.3/checkstyle/suppressions.xml'
'https://raw.githubusercontent.com/wso2/code-quality-tools/v1.4/checkstyle/jdk-17/checkstyle.xml',
'https://raw.githubusercontent.com/wso2/code-quality-tools/v1.4/checkstyle/jdk-17/suppressions.xml'
])
overwrite false
onlyIfNewer true
Expand Down
12 changes: 6 additions & 6 deletions build-config/resources/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,34 @@ icon = "icon.png"
license = ["Apache-2.0"]
distribution = "2201.7.0"

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

[[platform.java11.dependency]]
[[platform.java17.dependency]]
groupId = "com.sun.mail"
artifactId = "javax.mail"
version = "1.6.2"
path = "./lib/javax.mail-1.6.2.jar"

[[platform.java11.dependency]]
[[platform.java17.dependency]]
groupId = "com.icegreen"
artifactId = "greenmail"
version = "1.5.11"
path = "./lib/greenmail-1.5.11.jar"

[[platform.java11.dependency]]
[[platform.java17.dependency]]
groupId = "org.jvnet.mimepull"
artifactId = "mimepull"
version = "1.9.11"
path = "./lib/mimepull-1.9.11.jar"

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

[[platform.java11.dependency]]
[[platform.java17.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "email-test-utils"
version = "@toml.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 @@ -25,4 +25,8 @@
<Class name="io.ballerina.stdlib.email.server.EmailListener"/>
<Bug code="SIC" />
</Match>
<Match>
<Class name="io.ballerina.stdlib.email.server.EmailConsumer"/>
<Bug pattern="EI_EXPOSE_REP2" />
</Match>
</FindBugsFilter>
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ org.gradle.caching=true
group=io.ballerina.stdlib
version=2.8.0-SNAPSHOT
slf4jVersion=1.7.30
testngVersion=7.4.0
testngVersion=7.6.1
javaMailVersion=1.6.2
greenmailVersion=1.5.11
mimepullVersion=1.9.11
puppycrawlCheckstyleVersion=8.18
checkstylePluginVersion=8.18
githubSpotbugsVersion=4.5.1
githubJohnrengelmanShadowVersion=5.2.0
underCouchDownloadVersion=4.0.4
puppycrawlCheckstyleVersion=10.12.0
checkstylePluginVersion=10.12.0
githubSpotbugsVersion=5.0.14
githubJohnrengelmanShadowVersion=8.1.0
underCouchDownloadVersion=5.4.0
researchgateReleaseVersion=2.8.0
ballerinaGradlePluginVersion=1.1.0

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Tue Oct 08 08:23:30 IST 2020
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

plugins {
id "com.gradle.enterprise" version "3.2"
id "com.gradle.enterprise" version "3.13.2"
}

rootProject.name = 'email'
Expand Down

0 comments on commit b14288e

Please sign in to comment.