Skip to content

Commit

Permalink
Merge pull request #1069 from ballerina-platform/java_17_migration
Browse files Browse the repository at this point in the history
Merge with java 17 branch
  • Loading branch information
warunalakshitha authored Jul 31, 2023
2 parents b8b2ee5 + fa455b1 commit a8366db
Show file tree
Hide file tree
Showing 19 changed files with 253 additions and 157 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
4 changes: 2 additions & 2 deletions .github/workflows/build-timestamped-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,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 @@ -11,11 +11,11 @@ jobs:
if: github.repository_owner == 'ballerina-platform'
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
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 @@ -32,11 +32,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 @@ -70,9 +70,9 @@ This repository only contains the source code for the module.

### 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
16 changes: 8 additions & 8 deletions ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
[package]
org = "ballerina"
name = "io"
version = "1.5.0"
version = "1.5.1"
authors = ["Ballerina"]
keywords = ["io", "json", "xml", "csv", "file"]
repository = "https://github.com/ballerina-platform/module-ballerina-io"
icon = "icon.png"
license = ["Apache-2.0"]
distribution = "2201.7.0"

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

[[platform.java11.dependency]]
[[platform.java17.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "io-native"
path = "../native/build/libs/io-native-1.5.0.jar"
version = "1.5.0"
path = "../native/build/libs/io-native-1.5.1-SNAPSHOT.jar"
version = "1.5.1"


[[platform.java11.dependency]]
path = "../test-utils/build/libs/io-test-utils-1.5.0.jar"
[[platform.java17.dependency]]
path = "../test-utils/build/libs/io-test-utils-1.5.1-SNAPSHOT.jar"
scope = "testOnly"
version = "1.5.0"
version = "1.5.1-SNAPSHOT"
4 changes: 2 additions & 2 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.7.0"
distribution-version = "2201.8.0-20230726-145300-b2bdf796"

[[package]]
org = "ballerina"
name = "io"
version = "1.5.0"
version = "1.5.1"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.float"},
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://github.com/raw/wso2/code-quality-tools/v1.3/checkstyle/checkstyle.xml',
'https://github.com/raw/wso2/code-quality-tools/v1.3/checkstyle/suppressions.xml'
'https://github.com/raw/wso2/code-quality-tools/v1.4/checkstyle/jdk-17/checkstyle.xml',
'https://github.com/raw/wso2/code-quality-tools/v1.4/checkstyle/jdk-17/suppressions.xml'
])
overwrite false
onlyIfNewer true
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 @@ -9,17 +9,17 @@ icon = "icon.png"
license = ["Apache-2.0"]
distribution = "2201.7.0"

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

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


[[platform.java11.dependency]]
[[platform.java17.dependency]]
path = "../test-utils/build/libs/io-test-utils-@project.version@.jar"
scope = "testOnly"
version = "@project.version@"
26 changes: 26 additions & 0 deletions build-config/spotbugs-exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,30 @@
~ under the License.
-->
<FindBugsFilter>
<Match>
<Class name="io.ballerina.stdlib.io.channels.BlobChannel"/>
<Field name="writableChannel"/>
<Bug pattern="EI_EXPOSE_REP2"/>
</Match>
<Match>
<Class name="io.ballerina.stdlib.io.channels.FileIOChannel"/>
<Field name="channel"/>
<Bug pattern="EI_EXPOSE_REP2"/>
</Match>
<Match>
<Class name="io.ballerina.stdlib.io.channels.base.CharacterChannel"/>
<Bug pattern="EI_EXPOSE_REP, EI_EXPOSE_REP2"/>
</Match>
<Match>
<Class name="io.ballerina.stdlib.io.channels.base.DataChannel"/>
<Bug pattern="EI_EXPOSE_REP, EI_EXPOSE_REP2"/>
</Match>
<Match>
<Class name="io.ballerina.stdlib.io.channels.base.DelimitedRecordChannel"/>
<Bug pattern="EI_EXPOSE_REP2"/>
</Match>
<Match>
<Class name="io.ballerina.stdlib.io.readers.CharacterChannelReader"/>
<Bug pattern="EI_EXPOSE_REP2"/>
</Match>
</FindBugsFilter>
18 changes: 9 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
org.gradle.caching=true
group=io.ballerina.stdlib
version=1.5.1-SNAPSHOT
ballerinaLangVersion= 2201.7.0
puppycrawlCheckstyleVersion=8.18
testngVersion=6.14.3
ballerinaLangVersion=2201.8.0-20230726-145300-b2bdf796
puppycrawlCheckstyleVersion=10.12.0
testngVersion=7.6.1
slf4jVersion=1.7.30
jacocoVersion=0.8.6
githubSpotbugsVersion=4.0.5
githubJohnrengelmanShadowVersion=5.2.0
underCouchDownloadVersion=4.0.4
jacocoVersion=0.8.10
githubSpotbugsVersion=5.0.14
githubJohnrengelmanShadowVersion=8.1.1
underCouchDownloadVersion=5.4.0
researchgateReleaseVersion=2.8.0
checkstyleToolVersion=7.8.2
ballerinaGradlePluginVersion=1.1.0
checkstyleToolVersion=10.12.0
ballerinaGradlePluginVersion=2.0.1-SNAPSHOT
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
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 a8366db

Please sign in to comment.