From 635a649daed1ee4599cba8ebcc864f09242c6a3c Mon Sep 17 00:00:00 2001 From: Thisaru Guruge Date: Fri, 31 Jan 2025 15:05:05 +0530 Subject: [PATCH 1/4] Update the Ballerina Gradle Plugin version --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 79cbb10..04f946b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -11,7 +11,7 @@ githubSpotbugsVersion=6.0.18 githubJohnrengelmanShadowVersion=8.1.1 underCouchDownloadVersion=4.0.4 researchgateReleaseVersion=2.8.0 -ballerinaGradlePluginVersion=2.0.1 +ballerinaGradlePluginVersion=2.3.0 stdlibIoVersion=1.7.0-20250127-170200-0d36f73 stdlibTimeVersion=2.6.0-20250127-170200-86bdc5a From 2d0eb011d204f81c2d11359c3fbb9eee6aeb9845 Mon Sep 17 00:00:00 2001 From: Thisaru Guruge Date: Fri, 31 Jan 2025 15:30:24 +0530 Subject: [PATCH 2/4] Fix build scripts --- ballerina/build.gradle | 17 ++--------------- build.gradle | 14 ++++++++++---- gradle.properties | 8 ++++---- settings.gradle | 21 +++++++++++++++++++++ 4 files changed, 37 insertions(+), 23 deletions(-) diff --git a/ballerina/build.gradle b/ballerina/build.gradle index 4fc312a..abc1b52 100644 --- a/ballerina/build.gradle +++ b/ballerina/build.gradle @@ -17,19 +17,8 @@ import org.apache.tools.ant.taskdefs.condition.Os -buildscript { - repositories { - maven { - url = 'https://maven.pkg.github.com/ballerina-platform/plugin-gradle' - credentials { - username System.getenv("packageUser") - password System.getenv("packagePAT") - } - } - } - dependencies { - classpath "io.ballerina:plugin-gradle:${project.ballerinaGradlePluginVersion}" - } +plugins { + id 'io.ballerina.plugin' } description = 'Ballerina - Data XML Module' @@ -57,8 +46,6 @@ def stripBallerinaExtensionVersion(String extVersion) { } } -apply plugin: 'io.ballerina.plugin' - ballerina { packageOrganization = packageOrg module = packageName diff --git a/build.gradle b/build.gradle index a272ee8..002cb04 100644 --- a/build.gradle +++ b/build.gradle @@ -17,10 +17,10 @@ */ plugins { - 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 "com.github.spotbugs" + id "com.github.johnrengelman.shadow" + id "de.undercouch.download" + id "net.researchgate.release" } allprojects { @@ -63,9 +63,15 @@ subprojects { configurations { ballerinaStdLibs + jbalTools } dependencies { + /* JBallerina Tools */ + jbalTools ("org.ballerinalang:jballerina-tools:${ballerinaLangVersion}") { + transitive = false + } + /* Standard libraries */ ballerinaStdLibs "io.ballerina.stdlib:io-ballerina:${stdlibIoVersion}" ballerinaStdLibs "io.ballerina.stdlib:constraint-ballerina:${stdlibConstraintVersion}" diff --git a/gradle.properties b/gradle.properties index 04f946b..0953820 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,10 +7,10 @@ checkstyleToolVersion=10.12.0 puppycrawlCheckstyleVersion=10.12.0 testngVersion=7.6.1 slf4jVersion=2.0.7 -githubSpotbugsVersion=6.0.18 -githubJohnrengelmanShadowVersion=8.1.1 -underCouchDownloadVersion=4.0.4 -researchgateReleaseVersion=2.8.0 +spotbugsPluginVersion=6.0.18 +shadowJarPluginVersion=8.1.1 +downloadPluginVersion=4.0.4 +releasePluginVersion=2.8.0 ballerinaGradlePluginVersion=2.3.0 stdlibIoVersion=1.7.0-20250127-170200-0d36f73 diff --git a/settings.gradle b/settings.gradle index dea0cbc..ef0e940 100644 --- a/settings.gradle +++ b/settings.gradle @@ -16,6 +16,27 @@ * under the License. */ +pluginManagement { + plugins { + id "com.github.spotbugs-base" version "${spotbugsPluginVersion}" + id "com.github.johnrengelman.shadow" version "${shadowJarPluginVersion}" + id "de.undercouch.download" version "${downloadPluginVersion}" + id "net.researchgate.release" version "${releasePluginVersion}" + id "io.ballerina.plugin" version "${ballerinaGradlePluginVersion}" + } + + repositories { + gradlePluginPortal() + maven { + url = 'https://maven.pkg.github.com/ballerina-platform/*' + credentials { + username System.getenv("packageUser") + password System.getenv("packagePAT") + } + } + } +} + plugins { id "com.gradle.enterprise" version "3.2" } From b0ae630f5a6bd0d5d6fb6e7b7c526ea73f486d9b Mon Sep 17 00:00:00 2001 From: Thisaru Guruge Date: Fri, 31 Jan 2025 15:35:52 +0530 Subject: [PATCH 3/4] Fix build scripts --- compiler-plugin-test/build.gradle | 4 ++-- compiler-plugin/build.gradle | 4 ++-- gradle.properties | 1 - native/build.gradle | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/compiler-plugin-test/build.gradle b/compiler-plugin-test/build.gradle index ec3b0a1..0586e59 100644 --- a/compiler-plugin-test/build.gradle +++ b/compiler-plugin-test/build.gradle @@ -26,7 +26,7 @@ description = 'Ballerina - Xmldata Compiler Plugin Tests' dependencies { checkstyle project(':checkstyle') - checkstyle "com.puppycrawl.tools:checkstyle:${puppycrawlCheckstyleVersion}" + checkstyle "com.puppycrawl.tools:checkstyle:${checkstyleToolVersion}" implementation project(':data.xmldata-compiler-plugin') @@ -41,7 +41,7 @@ tasks.withType(Checkstyle) { } checkstyle { - toolVersion "${project.puppycrawlCheckstyleVersion}" + toolVersion "${project.checkstyleToolVersion}" configFile rootProject.file("build-config/checkstyle/build/checkstyle.xml") configProperties = ["suppressionFile" : file("${rootDir}/build-config/checkstyle/build/suppressions.xml")] } diff --git a/compiler-plugin/build.gradle b/compiler-plugin/build.gradle index 7192800..9dfd5ce 100644 --- a/compiler-plugin/build.gradle +++ b/compiler-plugin/build.gradle @@ -26,7 +26,7 @@ description = 'Ballerina - Xmldata Compiler Plugin' dependencies { checkstyle project(':checkstyle') - checkstyle "com.puppycrawl.tools:checkstyle:${puppycrawlCheckstyleVersion}" + checkstyle "com.puppycrawl.tools:checkstyle:${checkstyleToolVersion}" implementation group: 'org.ballerinalang', name: 'ballerina-lang', version: "${ballerinaLangVersion}" implementation group: 'org.ballerinalang', name: 'ballerina-tools-api', version: "${ballerinaLangVersion}" @@ -39,7 +39,7 @@ tasks.withType(Checkstyle) { } checkstyle { - toolVersion "${project.puppycrawlCheckstyleVersion}" + toolVersion "${project.checkstyleToolVersion}" configFile rootProject.file("build-config/checkstyle/build/checkstyle.xml") configProperties = ["suppressionFile" : file("${rootDir}/build-config/checkstyle/build/suppressions.xml")] } diff --git a/gradle.properties b/gradle.properties index 0953820..1fdfe06 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,6 @@ version=1.2.0-SNAPSHOT ballerinaLangVersion=2201.11.0-20250127-101700-a4b67fe5 checkstyleToolVersion=10.12.0 -puppycrawlCheckstyleVersion=10.12.0 testngVersion=7.6.1 slf4jVersion=2.0.7 spotbugsPluginVersion=6.0.18 diff --git a/native/build.gradle b/native/build.gradle index a65edca..8d0219e 100644 --- a/native/build.gradle +++ b/native/build.gradle @@ -27,7 +27,7 @@ description = 'Ballerina - Data.XML Java Utils' dependencies { implementation 'junit:junit:4.13.1' checkstyle project(':checkstyle') - checkstyle "com.puppycrawl.tools:checkstyle:${puppycrawlCheckstyleVersion}" + checkstyle "com.puppycrawl.tools:checkstyle:${checkstyleToolVersion}" implementation 'org.apache.commons:commons-lang3:3.6' implementation group: 'org.ballerinalang', name: 'ballerina-lang', version: "${ballerinaLangVersion}" From 3a9da3c147f1df78fdb3c4dd5db22f33f83eeda3 Mon Sep 17 00:00:00 2001 From: Thisaru Guruge Date: Fri, 31 Jan 2025 15:38:19 +0530 Subject: [PATCH 4/4] Fix build scripts --- settings.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings.gradle b/settings.gradle index ef0e940..7d10ca4 100644 --- a/settings.gradle +++ b/settings.gradle @@ -18,7 +18,7 @@ pluginManagement { plugins { - id "com.github.spotbugs-base" version "${spotbugsPluginVersion}" + id "com.github.spotbugs" version "${spotbugsPluginVersion}" id "com.github.johnrengelman.shadow" version "${shadowJarPluginVersion}" id "de.undercouch.download" version "${downloadPluginVersion}" id "net.researchgate.release" version "${releasePluginVersion}"