From fa4db075e6823756dd47f66c6a79e26bdec00cc6 Mon Sep 17 00:00:00 2001 From: Thisaru Guruge Date: Fri, 31 Jan 2025 16:34:46 +0530 Subject: [PATCH 1/3] 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 6472a9d2..37b7bd88 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ version=2.13.0-SNAPSHOT ballerinaLangVersion=2201.11.0-20250127-101700-a4b67fe5 puppycrawlCheckstyleVersion=10.12.0 testngVersion=7.6.1 -ballerinaGradlePluginVersion=2.0.1 +ballerinaGradlePluginVersion=2.3.0 gsonVersion=2.8.8 spotbugsPluginVersion=6.0.18 From 4f48db06eec5770d37cb62cb0ccc844e752c5004 Mon Sep 17 00:00:00 2001 From: Thisaru Guruge Date: Fri, 31 Jan 2025 17:24:07 +0530 Subject: [PATCH 2/3] Fix build scripts --- ballerina/build.gradle | 17 ++--------------- build.gradle | 17 ++++++++++++----- compiler-plugin-tests/build.gradle | 4 ++-- compiler-plugin/build.gradle | 4 ++-- gradle.properties | 8 ++++---- native/build.gradle | 2 +- settings.gradle | 21 +++++++++++++++++++++ 7 files changed, 44 insertions(+), 29 deletions(-) diff --git a/ballerina/build.gradle b/ballerina/build.gradle index f2c06c2f..9ca0b483 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 - Websub Ballerina Generator' @@ -56,8 +45,6 @@ def stripBallerinaExtensionVersion(String extVersion) { } } -apply plugin: 'io.ballerina.plugin' - ballerina { packageOrganization = packageOrg module = packageName diff --git a/build.gradle b/build.gradle index cee18137..2648d9ee 100644 --- a/build.gradle +++ b/build.gradle @@ -16,14 +16,14 @@ */ plugins { - 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}" + id "com.github.spotbugs" + id "com.github.johnrengelman.shadow" + id "de.undercouch.download" + id "net.researchgate.release" } ext.ballerinaLangVersion = project.ballerinaLangVersion -ext.puppycrawlCheckstyleVersion = project.puppycrawlCheckstyleVersion +ext.checkstylePluginVersion = project.checkstylePluginVersion allprojects { group = project.group @@ -66,8 +66,15 @@ subprojects { configurations { ballerinaStdLibs + jbalTools } + dependencies { + /* JBallerina Tools */ + jbalTools ("org.ballerinalang:jballerina-tools:${ballerinaLangVersion}") { + transitive = false + } + /* Standard libraries */ ballerinaStdLibs "io.ballerina.stdlib:constraint-ballerina:${stdlibConstraintVersion}" ballerinaStdLibs "io.ballerina.stdlib:io-ballerina:${stdlibIoVersion}" diff --git a/compiler-plugin-tests/build.gradle b/compiler-plugin-tests/build.gradle index e2494eb4..f3aa8ca0 100644 --- a/compiler-plugin-tests/build.gradle +++ b/compiler-plugin-tests/build.gradle @@ -26,7 +26,7 @@ description = 'Ballerina - WebSub Compiler Plugin Tests' dependencies { checkstyle project(':checkstyle') - checkstyle "com.puppycrawl.tools:checkstyle:${puppycrawlCheckstyleVersion}" + checkstyle "com.puppycrawl.tools:checkstyle:${checkstylePluginVersion}" testImplementation group: 'org.ballerinalang', name: 'ballerina-lang', version: "${ballerinaLangVersion}" testImplementation group: 'org.ballerinalang', name: 'ballerina-tools-api', version: "${ballerinaLangVersion}" @@ -41,7 +41,7 @@ tasks.withType(Checkstyle) { } checkstyle { - toolVersion "${project.puppycrawlCheckstyleVersion}" + toolVersion "${project.checkstylePluginVersion}" 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 2eaf2d1b..8171caa1 100644 --- a/compiler-plugin/build.gradle +++ b/compiler-plugin/build.gradle @@ -25,14 +25,14 @@ description = 'Ballerina - Websub Compiler Plugin' dependencies { checkstyle project(':checkstyle') - checkstyle "com.puppycrawl.tools:checkstyle:${puppycrawlCheckstyleVersion}" + checkstyle "com.puppycrawl.tools:checkstyle:${checkstylePluginVersion}" implementation group: 'org.ballerinalang', name: 'ballerina-lang', version: "${ballerinaLangVersion}" implementation group: 'org.ballerinalang', name: 'ballerina-parser', version: "${ballerinaLangVersion}" implementation group: 'org.ballerinalang', name: 'ballerina-tools-api', version: "${ballerinaLangVersion}" } checkstyle { - toolVersion "${project.puppycrawlCheckstyleVersion}" + toolVersion "${project.checkstylePluginVersion}" 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 37b7bd88..928356aa 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,15 +2,15 @@ org.gradle.caching=true group=io.ballerina.stdlib version=2.13.0-SNAPSHOT ballerinaLangVersion=2201.11.0-20250127-101700-a4b67fe5 -puppycrawlCheckstyleVersion=10.12.0 -testngVersion=7.6.1 -ballerinaGradlePluginVersion=2.3.0 -gsonVersion=2.8.8 +checkstylePluginVersion=10.12.0 spotbugsPluginVersion=6.0.18 shadowJarPluginVersion=8.1.1 downloadPluginVersion=5.4.0 releasePluginVersion=2.8.0 +ballerinaGradlePluginVersion=2.3.0 +testngVersion=7.6.1 +gsonVersion=2.8.8 # Direct Dependencies stdlibIoVersion=1.7.0-20250127-170200-0d36f73 diff --git a/native/build.gradle b/native/build.gradle index f9981357..1ab441e1 100644 --- a/native/build.gradle +++ b/native/build.gradle @@ -25,7 +25,7 @@ description = 'Ballerina - Websub Java Utils' dependencies { checkstyle project(':checkstyle') - checkstyle "com.puppycrawl.tools:checkstyle:${puppycrawlCheckstyleVersion}" + checkstyle "com.puppycrawl.tools:checkstyle:${checkstylePluginVersion}" implementation group: 'org.ballerinalang', name: 'ballerina-lang', version: "${ballerinaLangVersion}" implementation group: 'org.ballerinalang', name: 'ballerina-tools-api', version: "${ballerinaLangVersion}" implementation (group: 'org.ballerinalang', name: 'ballerina-runtime', version: "${ballerinaLangVersion}") { diff --git a/settings.gradle b/settings.gradle index b0f3cd54..a4629110 100644 --- a/settings.gradle +++ b/settings.gradle @@ -7,6 +7,27 @@ * in the user manual at https://docs.gradle.org/6.3/userguide/multi_project_builds.html */ +pluginManagement { + plugins { + 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}" + 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.13.2" } From e4b6268cf96cae9bc73d818c94b00c981b400e03 Mon Sep 17 00:00:00 2001 From: Thisaru Guruge Date: Fri, 31 Jan 2025 17:24:27 +0530 Subject: [PATCH 3/3] Fix build scripts --- build.gradle | 3 --- 1 file changed, 3 deletions(-) diff --git a/build.gradle b/build.gradle index 2648d9ee..2f5caea7 100644 --- a/build.gradle +++ b/build.gradle @@ -22,9 +22,6 @@ plugins { id "net.researchgate.release" } -ext.ballerinaLangVersion = project.ballerinaLangVersion -ext.checkstylePluginVersion = project.checkstylePluginVersion - allprojects { group = project.group version = project.version