Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to java 21 #168

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/build-dev-branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 17.0.7
distribution: 'temurin'
java-version: 21.0.3
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
Expand All @@ -38,11 +38,11 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 17.0.7
distribution: 'temurin'
java-version: 21.0.3
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 17.0.7
distribution: 'temurin'
java-version: 21.0.3
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
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@v3
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17.0.7
java-version: 21.0.3
- name: Build with Gradle
env:
packageUser: ${{ github.actor }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/daily-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 17.0.7
distribution: 'temurin'
java-version: 21.0.3

# Build the project with Gradle
- name: Build with Gradle
Expand Down
4 changes: 2 additions & 2 deletions .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: '17'
java-version: '21'
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -40,7 +40,7 @@ jobs:
- name: Set Up Ballerina
uses: ballerina-platform/setup-ballerina@v1
with:
version: 2201.6.0
version: 2201.11.0

- name: Update dependency versions
run: ./gradlew :prometheus-extension-ballerina:updateTomlVerions
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-release.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@v3
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 17.0.7
distribution: 'temurin'
java-version: 21.0.3
- 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
12 changes: 6 additions & 6 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 17.0.7
distribution: 'temurin'
java-version: 21.0.3
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
Expand All @@ -32,11 +32,11 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 17.0.7
distribution: 'temurin'
java-version: 21.0.3
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
Expand Down
22 changes: 15 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@

plugins {
id 'checkstyle'
id "com.github.spotbugs" version "5.0.14"
id "net.researchgate.release" version "2.8.0"
id "de.undercouch.download" version "5.4.0"
id "com.github.spotbugs" version "${githubSpotbugsVersion}"
id "com.github.johnrengelman.shadow" version "${githubJohnrengelmanShadowVersion}"
id "de.undercouch.download" version "${underCouchDownloadVersion}"
id "net.researchgate.release" version "${researchgateReleaseVersion}"
id 'jacoco'
}

Expand Down Expand Up @@ -95,15 +96,19 @@ subprojects {
ballerinaStdLibs "io.ballerina.stdlib:jwt-ballerina:${stdlibJwtVersion}"
ballerinaStdLibs "io.ballerina.stdlib:oauth2-ballerina:${stdlibOAuth2Version}"
ballerinaStdLibs "io.ballerina.stdlib:uuid-ballerina:${stdlibUuidVersion}"
ballerinaStdLibs "io.ballerina.lib:data.jsondata-ballerina:${stdlibDataJsondataVersion}"
}

checkstyle {
toolVersion '10.12.1'
}

spotbugsMain {
it.effort "max"
it.reportLevel "low"
def classLoader = plugins["com.github.spotbugs"].class.classLoader
def SpotBugsConfidence = classLoader.findLoadedClass("com.github.spotbugs.snom.Confidence")
def SpotBugsEffort = classLoader.findLoadedClass("com.github.spotbugs.snom.Effort")
it.effort = SpotBugsEffort.MAX
it.reportLevel = SpotBugsConfidence.LOW
it.reports {
xml.enabled false
html.enabled true
Expand All @@ -115,8 +120,11 @@ subprojects {
}

spotbugsTest {
it.effort "max"
it.reportLevel "low"
def classLoader = plugins["com.github.spotbugs"].class.classLoader
def SpotBugsConfidence = classLoader.findLoadedClass("com.github.spotbugs.snom.Confidence")
def SpotBugsEffort = classLoader.findLoadedClass("com.github.spotbugs.snom.Effort")
it.effort = SpotBugsEffort.MAX
it.reportLevel = SpotBugsConfidence.LOW
it.reports {
xml.enabled false
html.enabled true
Expand Down
44 changes: 25 additions & 19 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,40 @@

group=org.ballerinalang
version=1.0.0-SNAPSHOT
ballerinaLangVersion=2201.10.0
ballerinaLangVersion=2201.11.0-20241218-101200-109f6cc7

org.gradle.caching=true
org.gradle.parallel=true
org.gradle.jvmargs='-Dfile.encoding=UTF-8'
org.gradle.workers.max=3

githubSpotbugsVersion=6.0.18
githubJohnrengelmanShadowVersion=8.1.1
underCouchDownloadVersion=5.4.0
researchgateReleaseVersion=2.8.0

# Observe Modules
observeVersion=1.2.3
observeInternalVersion=1.2.2
observeVersion=1.4.0-20241218-111700-4d29d40
observeInternalVersion=1.4.0-20241218-112700-be9da2c

# Ballerina Module Dependency Versions
stdlibConstraintVersion=1.5.0
stdlibHttpVersion=2.11.0
stdlibIoVersion=1.6.0
stdlibOsVersion=1.8.0
stdlibTimeVersion=2.4.0
stdlibUrlVersion=2.4.0
stdlibTaskVersion=2.5.0
stdlibFileVersion=1.9.0
stdlibCryptoVersion=2.7.0
stdlibLogVersion=2.9.0
stdlibMimeVersion=2.9.0
stdlibCacheVersion=3.8.0
stdlibAuthVersion=2.11.0
stdlibJwtVersion=2.11.0
stdlibOAuth2Version=2.11.0
stdlibUuidVersion=1.8.0
stdlibConstraintVersion=1.6.0-20241218-112400-cd313f2
stdlibHttpVersion=2.13.0-20241218-142000-8d9c012
stdlibIoVersion=1.7.0-20241218-111600-1da6a3f
stdlibOsVersion=1.9.0-20241218-112400-c81f077
stdlibTimeVersion=2.6.0-20241218-111600-f57d32a
stdlibDataJsondataVersion=1.0.0-20241218-133400-f0c9ec4
stdlibUrlVersion=2.5.0-20241218-111600-4f962bc
stdlibTaskVersion=2.6.0-20241218-112900-84f2aea
stdlibFileVersion=1.11.0-20241218-125000-364d941
stdlibCryptoVersion=2.8.0-20241218-112400-d6f4922
stdlibLogVersion=2.11.0-20241218-115100-06c729e
stdlibMimeVersion=2.11.0-20241218-125100-e28a03b
stdlibCacheVersion=3.9.0-20241218-114600-9f52392
stdlibAuthVersion=2.13.0-20241218-124900-9203135
stdlibJwtVersion=2.14.0-20241218-125000-c952d1e
stdlibOAuth2Version=2.13.0-20241218-125400-c7625c1
stdlibUuidVersion=1.9.0-20241218-124000-a38f1c9

# Test Dependency Versions
testngVersion=7.6.1
Expand Down
2 changes: 1 addition & 1 deletion prometheus-extension-ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
org = "ballerinax"
name = "prometheus"
version = "@toml.version@"
distribution = "2201.10.0"
distribution = "2201.11.0"

[platform.java17]
graalvmCompatible = true
Loading