Skip to content

Commit

Permalink
Merge pull request #155 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 authored Aug 14, 2023
2 parents bd6e595 + 54cbfe8 commit bd5cf39
Show file tree
Hide file tree
Showing 21 changed files with 280 additions and 214 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
16 changes: 8 additions & 8 deletions .github/workflows/build-dev-branches.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.0.7
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
Expand All @@ -38,12 +38,12 @@ jobs:
runs-on: windows-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.0.7
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Download Jaeger server executable
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-main.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.0.7
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Set Docker Host env variable
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.0.7
- name: Build with Gradle
env:
packageUser: ${{ github.actor }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/daily-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up JDK 11
uses: actions/setup-java@v2
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 11
java-version: 17.0.7

# Build the project with Gradle
- name: Build with Gradle
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/graalvm-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: graalvm/setup-graalvm@v1
with:
version: 'latest'
java-version: '11'
java-version: '17.0.7'
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}

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 @@ -8,12 +8,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.0.7
- name: Set version env variable
run: echo "VERSION=$((grep -w 'version' | cut -d= -f2) < gradle.properties | rev | cut --complement -d- -f1 | rev)" >> $GITHUB_ENV
- name: Pre release depenency version update
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 @@ -7,12 +7,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.0.7
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Set Docker Host env variable
Expand All @@ -34,12 +34,12 @@ jobs:
runs-on: windows-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.0.7
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Download Jaeger server executable
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

### Setting 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://adoptopenjdk.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 @@ -22,8 +22,8 @@ plugins {

task downloadFiles(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.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

plugins {
id 'checkstyle'
id "com.github.spotbugs" version "4.5.1"
id "com.github.spotbugs" version "5.0.14"
id "net.researchgate.release" version "2.8.0"
id "de.undercouch.download" version "4.0.4"
id "de.undercouch.download" version "5.4.0"
id "jacoco"
}

Expand Down Expand Up @@ -57,7 +57,7 @@ allprojects {
}

subprojects {
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'checkstyle'
apply plugin: 'com.github.spotbugs'

Expand Down Expand Up @@ -98,7 +98,7 @@ subprojects {
}

checkstyle {
toolVersion '8.18'
toolVersion '10.12.1'
}

spotbugsMain {
Expand Down Expand Up @@ -166,8 +166,8 @@ task codeCoverageReport(type: JacocoReport) {
}

reports {
xml.enabled = true
html.enabled = true
xml.required = true
html.required = true
xml.destination = new File("${buildDir}/reports/jacoco/report.xml")
html.destination = new File("${buildDir}/reports/jacoco/report.html")
}
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@

group=org.ballerinalang
version=0.3.0-SNAPSHOT
ballerinaLangVersion=2201.7.0
ballerinaLangVersion=2201.8.0-20230726-145300-b2bdf796
org.gradle.caching=true
org.gradle.parallel=true
org.gradle.jvmargs='-Dfile.encoding=UTF-8'
org.gradle.workers.max=3

# Native Dependency Versions
jaegerVersion=1.5.0
jaegerVersion=1.8.1
openTelemetryVersion=1.0.0
openTelemetryAlphaVersion=1.0.0-alpha
guavaVersion=30.1-jre
Expand All @@ -45,7 +45,7 @@ stdlibUrlVersion=2.2.1
stdlibTaskVersion=2.2.1
stdlibFileVersion=1.2.1
stdlibCryptoVersion=2.2.1
stdlibLogVersion=2.2.1
stdlibLogVersion=2.8.1-20230718-085900-36c385c
stdlibMimeVersion=2.2.1
stdlibCacheVersion=3.2.1
stdlibAuthVersion=2.2.1
Expand All @@ -54,7 +54,7 @@ stdlibOAuth2Version=2.2.1
stdlibUuidVersion=1.2.1

# Test Dependency Versions
testngVersion=6.14.3
testngVersion=7.6.1
slf4jVersion=1.7.26
dockerJavaVersion=3.2.7
gsonVersion=2.8.6
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-6.4-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 bd5cf39

Please sign in to comment.