Skip to content

Commit

Permalink
Merge pull request #422 from ballerina-platform/java_17_migration
Browse files Browse the repository at this point in the history
Sync Java 17 migration branch with main
  • Loading branch information
warunalakshitha committed Jul 31, 2023
2 parents 03279bf + 75a3d00 commit 5b46fa4
Show file tree
Hide file tree
Showing 16 changed files with 210 additions and 140 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 @@ -15,11 +15,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 @@ -18,11 +18,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
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 @@ -8,11 +8,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 All @@ -29,11 +29,11 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v1
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 @@ -23,8 +23,8 @@ This repository contains only the source code of the package.

### Set up the prerequisites

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

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

Expand Down
2 changes: 1 addition & 1 deletion ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ icon = "icon.png"
license = ["Apache-2.0"]
distribution = "2201.7.0"

[platform.java11]
[platform.java17]
graalvmCompatible = true
2 changes: 1 addition & 1 deletion ballerina/natives.bal
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import ballerina/time;
import ballerina/jballerina.java;

const decimal a = 25214903917;
const decimal c = 11;
const decimal c = 17;
final decimal & readonly m = <decimal>float:pow(2, 48);
isolated decimal x0 = currentTimeInMilliSeconds();

Expand Down
2 changes: 1 addition & 1 deletion build-config/resources/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ icon = "icon.png"
license = ["Apache-2.0"]
distribution = "2201.7.0"

[platform.java11]
[platform.java17]
graalvmCompatible = true
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ org.gradle.caching=true
group=io.ballerina.stdlib
version=1.4.1-SNAPSHOT

checkstylePluginVersion=8.18
spotbugsPluginVersion=4.5.1
shadowJarPluginVersion=5.2.0
downloadPluginVersion=4.0.4
checkstylePluginVersion=10.12.0
spotbugsPluginVersion=5.0.14
shadowJarPluginVersion=7.1.2
downloadPluginVersion=5.4.0
releasePluginVersion=2.6.0
ballerinaGradlePluginVersion=1.1.0
ballerinaGradlePluginVersion=2.0.1-SNAPSHOT

ballerinaLangVersion= 2201.7.0
ballerinaLangVersion=2201.8.0-20230726-145300-b2bdf796

#stdlib dependencies
stdlibTimeVersion=2.3.0
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

0 comments on commit 5b46fa4

Please sign in to comment.