From a93bb8f883a2a836d46b61dd75242db19019f7c6 Mon Sep 17 00:00:00 2001 From: gabilang Date: Thu, 22 Jun 2023 17:44:15 +0530 Subject: [PATCH 1/5] [Automated] Update native jar versions in toml files --- ballerina/Ballerina.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index f065e5bc..370018f3 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -9,10 +9,10 @@ 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.persist" artifactId = "persist-native" version = "1.1.0" From 944ec1b7e52e2453e22352927229d925007ba1bc Mon Sep 17 00:00:00 2001 From: gabilang Date: Thu, 22 Jun 2023 18:13:49 +0530 Subject: [PATCH 2/5] [Automated] Update native jar versions in toml files --- ballerina/Dependencies.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 6fcb2f4d..5e2939ca 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -5,7 +5,7 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.7.0-20230619-175900-bb4e4544" +distribution-version = "2201.7.0-SNAPSHOT" [[package]] org = "ballerina" From 8446461e851291b440b32c74ed364ff88381539f Mon Sep 17 00:00:00 2001 From: gabilang Date: Thu, 22 Jun 2023 18:33:29 +0530 Subject: [PATCH 3/5] Migrate to Java 17 --- .../workflows/build-timestamped-master.yml | 4 +-- .github/workflows/central-publish.yml | 4 +-- .github/workflows/publish-release.yml | 4 +-- .github/workflows/publish-snapshot-nexus.yml | 4 +-- .github/workflows/pull-request.yml | 8 +++--- .github/workflows/trivy-scan.yml | 4 +-- README.md | 4 +-- build-config/checkstyle/build.gradle | 4 +-- build-config/resources/Ballerina.toml | 4 +-- compiler-plugin-test/build.gradle | 5 ++-- .../src/test/resources/testng.xml | 2 +- gradle.properties | 12 ++++----- gradle/wrapper/gradle-wrapper.properties | 2 +- native/build.gradle | 4 +-- settings.gradle | 2 +- spotbugs-exclude.xml | 27 +++++++++++++++++++ 16 files changed, 61 insertions(+), 33 deletions(-) create mode 100644 spotbugs-exclude.xml diff --git a/.github/workflows/build-timestamped-master.yml b/.github/workflows/build-timestamped-master.yml index c5a3273b..d844bb3b 100644 --- a/.github/workflows/build-timestamped-master.yml +++ b/.github/workflows/build-timestamped-master.yml @@ -17,11 +17,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: Change to Timestamped Version run: | initialVersion=$((grep -w 'version' | cut -d= -f2) < gradle.properties ) diff --git a/.github/workflows/central-publish.yml b/.github/workflows/central-publish.yml index 49fa36ac..34e9683c 100644 --- a/.github/workflows/central-publish.yml +++ b/.github/workflows/central-publish.yml @@ -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 }} diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 3cff7e4c..613927ca 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -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 }} diff --git a/.github/workflows/publish-snapshot-nexus.yml b/.github/workflows/publish-snapshot-nexus.yml index f7b5cce3..1848098e 100644 --- a/.github/workflows/publish-snapshot-nexus.yml +++ b/.github/workflows/publish-snapshot-nexus.yml @@ -9,11 +9,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: ${{ secrets.BALLERINA_BOT_USERNAME }} diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 5d0d848c..0b06c501 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -12,11 +12,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 }} @@ -35,11 +35,11 @@ jobs: runs-on: windows-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 }} diff --git a/.github/workflows/trivy-scan.yml b/.github/workflows/trivy-scan.yml index e5d7ec4d..2c525573 100644 --- a/.github/workflows/trivy-scan.yml +++ b/.github/workflows/trivy-scan.yml @@ -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 }} diff --git a/README.md b/README.md index 30398d62..98f31152 100644 --- a/README.md +++ b/README.md @@ -179,8 +179,8 @@ This repository only contains the source code for 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/javase-jdk17-downloads.html) * [OpenJDK](https://adoptium.net/) 2. Export your GitHub personal access token with the read package permissions as follows. diff --git a/build-config/checkstyle/build.gradle b/build-config/checkstyle/build.gradle index b89ab41f..1dbe8db0 100644 --- a/build-config/checkstyle/build.gradle +++ b/build-config/checkstyle/build.gradle @@ -23,8 +23,8 @@ apply plugin: 'java' task downloadCheckstyleRuleFiles(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 diff --git a/build-config/resources/Ballerina.toml b/build-config/resources/Ballerina.toml index a784d608..d9384cd9 100644 --- a/build-config/resources/Ballerina.toml +++ b/build-config/resources/Ballerina.toml @@ -9,10 +9,10 @@ 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.persist" artifactId = "persist-native" version = "@toml.version@" diff --git a/compiler-plugin-test/build.gradle b/compiler-plugin-test/build.gradle index 0259ad86..4bf6d4bb 100644 --- a/compiler-plugin-test/build.gradle +++ b/compiler-plugin-test/build.gradle @@ -24,7 +24,7 @@ plugins { } jacoco { - toolVersion = "0.8.6" + toolVersion = "0.8.10" } description = 'Ballerina - Persist Compiler Plugin Test' @@ -39,6 +39,7 @@ dependencies { testImplementation group: 'org.ballerinalang', name: 'ballerina-tools-api', version: "${ballerinaLangVersion}" testImplementation group: 'org.ballerinalang', name: 'ballerina-parser', version: "${ballerinaLangVersion}" implementation group: 'org.testng', name: 'testng', version: "${testngVersion}" + testImplementation 'org.testng:testng' testImplementation group: 'com.google.code.gson', name: 'gson', version: "${gsonVersion}" } @@ -74,7 +75,7 @@ jacocoTestReport { additionalClassDirs files(it.sourceSets.main.output) } reports { - xml.enabled true + xml.required = true } } diff --git a/compiler-plugin-test/src/test/resources/testng.xml b/compiler-plugin-test/src/test/resources/testng.xml index 372e5506..a4acb15b 100644 --- a/compiler-plugin-test/src/test/resources/testng.xml +++ b/compiler-plugin-test/src/test/resources/testng.xml @@ -16,7 +16,7 @@ ~ under the License. --> - + diff --git a/gradle.properties b/gradle.properties index 7e62e8c6..a4249e15 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,14 +1,14 @@ group=io.ballerina.stdlib version=1.1.0-SNAPSHOT -puppycrawlCheckstyleVersion=8.18 +puppycrawlCheckstyleVersion=10.12.0 checkstyleToolVersion=7.8.2 -githubSpotbugsVersion=4.0.5 -githubJohnrengelmanShadowVersion=5.2.0 -underCouchDownloadVersion=4.0.4 +githubSpotbugsVersion=5.0.14 +githubJohnrengelmanShadowVersion=8.1.0 +underCouchDownloadVersion=5.4.0 researchgateReleaseVersion=2.8.0 -testngVersion=7.4.0 -gsonVersion=2.10 +testngVersion=7.6.1 +gsonVersion=2.10.1 ballerinaGradlePluginVersion=1.1.0 ballerinaLangVersion= 2201.7.0-20230622-064700-4a2dc6dd diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 69a97150..fae08049 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ 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.1.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/native/build.gradle b/native/build.gradle index 67e508f5..a3bd0e56 100644 --- a/native/build.gradle +++ b/native/build.gradle @@ -45,7 +45,7 @@ tasks.withType(JavaCompile) { sourceCompatibility = JavaVersion.VERSION_11 jacoco { - toolVersion = "0.8.6" + toolVersion = "0.8.10" } test { @@ -70,7 +70,7 @@ test { jacocoTestReport { dependsOn test reports { - xml.enabled true + xml.required = true } } diff --git a/settings.gradle b/settings.gradle index 1ae5c03a..a5c9992d 100644 --- a/settings.gradle +++ b/settings.gradle @@ -8,7 +8,7 @@ */ plugins { - id "com.gradle.enterprise" version "3.2" + id "com.gradle.enterprise" version "3.13.2" } rootProject.name = 'ballerina-persist' diff --git a/spotbugs-exclude.xml b/spotbugs-exclude.xml new file mode 100644 index 00000000..09fa540f --- /dev/null +++ b/spotbugs-exclude.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + \ No newline at end of file From fc8c5b21b0007b306aaad2fa122dae05af0c3f23 Mon Sep 17 00:00:00 2001 From: gabilang Date: Thu, 22 Jun 2023 18:38:59 +0530 Subject: [PATCH 4/5] Add file end new line character --- spotbugs-exclude.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spotbugs-exclude.xml b/spotbugs-exclude.xml index 09fa540f..aace7c52 100644 --- a/spotbugs-exclude.xml +++ b/spotbugs-exclude.xml @@ -24,4 +24,4 @@ - \ No newline at end of file + From f888280bcf3598974286cf4841a5c816aad989a7 Mon Sep 17 00:00:00 2001 From: Waruna Lakshitha Date: Mon, 26 Jun 2023 13:53:49 +0530 Subject: [PATCH 5/5] Update plugin versions --- ballerina/Dependencies.toml | 2 +- gradle.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 5e2939ca..6fcb2f4d 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -5,7 +5,7 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.7.0-SNAPSHOT" +distribution-version = "2201.7.0-20230619-175900-bb4e4544" [[package]] org = "ballerina" diff --git a/gradle.properties b/gradle.properties index a4249e15..2fc658b8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ underCouchDownloadVersion=5.4.0 researchgateReleaseVersion=2.8.0 testngVersion=7.6.1 gsonVersion=2.10.1 -ballerinaGradlePluginVersion=1.1.0 +ballerinaGradlePluginVersion=2.0.0 ballerinaLangVersion= 2201.7.0-20230622-064700-4a2dc6dd