Skip to content

Commit

Permalink
Merge pull request #1015 from ballerina-platform/java_17_migration
Browse files Browse the repository at this point in the history
Sync Java 17 changes with master branch
  • Loading branch information
warunalakshitha authored Jul 31, 2023
2 parents 78f9d09 + 7eaf9b6 commit 0be5182
Show file tree
Hide file tree
Showing 25 changed files with 259 additions and 187 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ensure all Java files use LF.
*.java eol=lf
8 changes: 4 additions & 4 deletions .github/workflows/build-timestamped-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
if: github.repository_owner == 'ballerina-platform'
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
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/build-with-bal-test-graalvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
lang_tag:
description: Branch/Release Tag of the Ballerina Lang
required: true
default: master
default: java_17_migration
lang_version:
description: Ballerina Lang Version (If given ballerina lang buid will be skipped)
required: false
Expand All @@ -30,7 +30,7 @@ jobs:
call_stdlib_workflow:
name: Run StdLib Workflow
if: ${{ github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'ballerina-platform') }}
uses: ballerina-platform/ballerina-standard-library/.github/workflows/build-with-bal-test-graalvm-template.yml@main
uses: ballerina-platform/ballerina-standard-library/.github/workflows/build-with-bal-test-graalvm-template.yml@java_17_migration
with:
lang_tag: ${{ inputs.lang_tag }}
lang_version: ${{ inputs.lang_version }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/central-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ jobs:
runs-on: ubuntu-latest
if: github.repository_owner == 'ballerina-platform'
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
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/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
java-version: 17
- name: Build with Gradle
env:
packageUser: ${{ github.actor }}
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
java-version: 17
- name: Build with Gradle
env:
packageUser: ${{ github.actor }}
Expand All @@ -38,12 +38,12 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
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/trivy-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
name: Build on Ubuntu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
java-version: 17
- name: Build with Gradle
env:
packageUser: ${{ github.actor }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Get current date
id: date
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,9 @@ This repository only contains the source code for the library.

### 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/downloads/)

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

Expand Down
14 changes: 7 additions & 7 deletions ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,28 @@ icon = "icon.png"
license = ["Apache-2.0"]
distribution = "2201.7.0"

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

[[platform.java11.dependency]]
[[platform.java17.dependency]]
groupId = "org.apache.commons"
artifactId = "commons-vfs2"
version = "2.8.0"
path = "./lib/commons-vfs2-2.8.0.jar"

[[platform.java11.dependency]]
[[platform.java17.dependency]]
groupId = "com.jcraft"
artifactId = "jsch"
version = "0.1.54"
path = "./lib/jsch-0.1.54.jar"
version = "0.1.55"
path = "./lib/jsch-0.1.55.jar"

[[platform.java11.dependency]]
[[platform.java17.dependency]]
groupId = "commons-net"
artifactId = "commons-net"
version = "3.9.0"
path = "./lib/commons-net-3.9.0.jar"

[[platform.java11.dependency]]
[[platform.java17.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "ftp-native"
version = "2.8.0"
Expand Down
4 changes: 3 additions & 1 deletion ballerina/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ dependencies {
externalJars(group: 'org.apache.commons', name: 'commons-vfs2', version: "${commonsVfsVersion}") {
transitive = false
}
externalJars(group: 'com.jcraft', name: 'jsch', version: "${jcraftVersion}") {
externalJars(group: 'com.jcraft', name: 'jsch', version: "${jschVersion}") {
transitive = false
}
externalJars(group: 'commons-net', name: 'commons-net', version: "${commonsNetVersion}") {
Expand Down Expand Up @@ -172,6 +172,8 @@ publishing {

updateTomlFiles.dependsOn copyStdlibs

tasks.generatePomFileForMavenPublication.dependsOn(startTestUtilAsDaemon)
tasks.copyToLib.dependsOn(startTestUtilAsDaemon)
build.dependsOn "generatePomFileForMavenPublication"
build.dependsOn ":${packageName}-native:build"
build.dependsOn ":${packageName}-compiler-plugin:build"
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
10 changes: 5 additions & 5 deletions build-config/resources/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,28 @@ icon = "icon.png"
license = ["Apache-2.0"]
distribution = "2201.7.0"

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

[[platform.java11.dependency]]
[[platform.java17.dependency]]
groupId = "org.apache.commons"
artifactId = "commons-vfs2"
version = "@commons.vfs2.version@"
path = "./lib/[email protected]@.jar"

[[platform.java11.dependency]]
[[platform.java17.dependency]]
groupId = "com.jcraft"
artifactId = "jsch"
version = "@jsch.version@"
path = "./lib/[email protected]@.jar"

[[platform.java11.dependency]]
[[platform.java17.dependency]]
groupId = "commons-net"
artifactId = "commons-net"
version = "@commons.net.version@"
path = "./lib/[email protected]@.jar"

[[platform.java11.dependency]]
[[platform.java17.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "ftp-native"
version = "@toml.version@"
Expand Down
7 changes: 3 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
*/

plugins {
id "com.github.spotbugs" version "4.2.3"
id "com.github.johnrengelman.shadow" version "5.2.0"
id "de.undercouch.download" version "4.0.4"
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"
}

Expand All @@ -35,7 +35,6 @@ ext.jschVersion = project.jschVersion
ext.mockFtpServerVersion = project.mockFtpServerVersion
ext.sshdMinaVersion = project.sshdMinaVersion
ext.ftpServerVersion = project.ftpServerVersion
ext.jcraftVersion = project.jcraftVersion
ext.sshdCoreVersion = project.sshdCoreVersion
ext.ftpletApiVersion = project.ftpletApiVersion
ext.minaCoreVersion = project.minaCoreVersion
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[package]
org = "ftp_test"
name = "invalid_service_17"
name = "invalid_service_11"
version = "0.1.0"
2 changes: 1 addition & 1 deletion compiler-plugin-tests/src/test/resources/testng.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
~ under the License.
-->

<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd" >

<suite name="BallerinaFTPCompilerPluginTests">
<test name="UnitTests">
Expand Down
14 changes: 7 additions & 7 deletions examples/covid19-stat-publisher/sftp-server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ repositories {
}

dependencies {
implementation group: 'org.mockftpserver', name: 'MockFtpServer', version: '3.0.0'
implementation group: 'org.apache.ftpserver', name: 'ftpserver-core', version: "1.1.1"
implementation group: 'org.apache.sshd', name: 'sshd-core', version: '1.7.0'
implementation group: 'org.slf4j', name: 'slf4j-jdk14', version: '1.7.30'
implementation group: 'commons-net', name: 'commons-net', version: '3.6'
implementation group: 'org.apache.commons', name: 'commons-vfs2', version: "2.8.0"
implementation group: 'com.jcraft', name: 'jsch', version: '0.1.54'
implementation group: 'org.mockftpserver', name: 'MockFtpServer', version: "${mockFtpServerVersion}"
implementation group: 'org.apache.ftpserver', name: 'ftpserver-core', version: "${ftpServerVersion}"
implementation group: 'org.apache.sshd', name: 'sshd-core', version: "${sshdCoreVersion}"
implementation group: 'org.slf4j', name: 'slf4j-jdk14', version: "${slf4jVersion}"
implementation group: 'commons-net', name: 'commons-net', version: "${commonsNetVersion}"
implementation group: 'org.apache.commons', name: 'commons-vfs2', version: "${commonsVfsVersion}"
implementation group: 'com.jcraft', name: 'jsch', version: "${jschVersion}"
}

mainClassName = 'SftpServer'
17 changes: 8 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,26 @@ org.gradle.caching=true
group=io.ballerina.stdlib
version=2.8.1-SNAPSHOT

puppycrawlCheckstyleVersion=8.18
testngVersion=6.14.3
puppycrawlCheckstyleVersion=10.12.0
testngVersion=7.6.1
slf4jVersion=1.7.30
commonsVfsVersion=2.8.0
commonsNetVersion=3.9.0
jschVersion=0.1.54
mockFtpServerVersion=2.7.1
jschVersion=0.1.55
mockFtpServerVersion=3.0.0
sshdMinaVersion=1.1.1
ftpServerVersion=1.1.1
jcraftVersion=0.1.54
sshdCoreVersion=1.7.0
ftpletApiVersion=1.1.1
ftpletApiVersion=1.1.3
minaCoreVersion=2.1.5
aopallianceVersion=1.0
jclSlf4jVersion=1.7.21
gsonVersion=2.8.8
jacocoVersion=0.8.8
jacocoVersion=0.8.10

ballerinaGradlePluginVersion=1.1.0
ballerinaGradlePluginVersion=2.0.1-SNAPSHOT

ballerinaLangVersion= 2201.7.0
ballerinaLangVersion=2201.8.0-20230726-145300-b2bdf796
stdlibTaskVersion=2.4.0
stdlibLogVersion=2.8.1-20230718-085900-36c385c
stdlibIoVersion=1.5.0
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 4 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Mon Oct 12 08:23:31 IST 2020
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 0be5182

Please sign in to comment.