Skip to content

Commit

Permalink
Merge pull request #512 from ballerina-platform/java_17_migration
Browse files Browse the repository at this point in the history
Sync Java 17 changes into master
  • Loading branch information
warunalakshitha committed Jul 31, 2023
2 parents 61fea60 + 61d79c4 commit 12db03f
Show file tree
Hide file tree
Showing 20 changed files with 236 additions and 175 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 @@ -12,12 +12,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: 'adopt'
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/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,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: 'adopt'
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 @@ -13,12 +13,12 @@ jobs:
runs-on: ubuntu-latest
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: 'adopt'
java-version: 11
java-version: 17
- name: Build with Gradle
env:
packageUser: ${{ github.actor }}
Expand All @@ -40,12 +40,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: 'adopt'
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: 'adopt'
java-version: 11
java-version: 17

- name: Build with Gradle
env:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ The transaction internal module is a dependency module which required for Baller

### Setting 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](http://openjdk.java.net/install/index.html)

2. Export Github Personal access token with read package permissions as follows,
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 downloadMultipleFiles(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
4 changes: 2 additions & 2 deletions build-config/resources/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ name = "transaction"
version = "@toml.version@"
distribution = "2201.7.0"

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

[[platform.java11.dependency]]
[[platform.java17.dependency]]
artifactId = "transaction"
version = "@project.version@"
path = "../transaction-native/build/libs/transaction-native-@project.version@.jar"
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
*/

plugins {
id "com.github.spotbugs" version "4.0.5"
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"
}

ext.ballerinaLangVersion = project.ballerinaLangVersion
ext.puppycrawlCheckstyleVersion = project.puppycrawlCheckstyleVersion
ext.testngVersion = "6.14.3"
ext.testngVersion = "7.6.1"
ext.slf4jVersion = "1.7.30"
ext.stdlibIoVersion = project.stdlibIoVersion
ext.stdlibOsVersion = project.stdlibOsVersion
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
org.gradle.caching=true
puppycrawlCheckstyleVersion=8.18
puppycrawlCheckstyleVersion=10.12.0
group=org.ballerinalang
version=1.7.0-SNAPSHOT

ballerinaLangVersion= 2201.7.0-20230622-064700-4a2dc6dd
ballerinaLangVersion=2201.8.0-20230726-145300-b2bdf796
stdlibIoVersion=1.5.0-20230622-110500-8523dfe
stdlibConstraintVersion=1.3.0-20230622-115000-e1ca592
stdlibOsVersion=1.7.0-20230622-115000-1a0833a
Expand All @@ -24,4 +24,4 @@ stdlibOAuth2Version=2.9.0-20230622-140500-ef79c89
observeVersion=1.1.0-20230622-105700-f92eb77
observeInternalVersion=1.1.0-20230622-114200-c6b7282

ballerinaGradlePluginVersion=1.1.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-all.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 12db03f

Please sign in to comment.