From 12bc62d3fab8eda967ee729c8af19c89a1f3dd43 Mon Sep 17 00:00:00 2001 From: Thisaru Guruge Date: Fri, 31 Jan 2025 16:23:09 +0530 Subject: [PATCH 1/2] 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 1482f27..45739de 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ spotbugsPluginVersion=6.0.18 shadowJarPluginVersion=8.1.1 downloadPluginVersion=5.4.0 releasePluginVersion=2.8.0 -ballerinaGradlePluginVersion=2.0.1 +ballerinaGradlePluginVersion=2.3.0 puppycrawlCheckstyleVersion=10.12.0 testngVersion=7.6.1 gsonVersion=2.8.8 From dbfe7ffee968c208e492da5aeaef856c7d7be29d Mon Sep 17 00:00:00 2001 From: Thisaru Guruge Date: Fri, 31 Jan 2025 16:38:23 +0530 Subject: [PATCH 2/2] Fix build scripts --- ballerina/build.gradle | 17 ++--------------- build.gradle | 6 ++++++ compiler-plugin-tests/build.gradle | 4 ++-- compiler-plugin/build.gradle | 4 ++-- gradle.properties | 1 - settings.gradle | 12 ++++++++++++ 6 files changed, 24 insertions(+), 20 deletions(-) diff --git a/ballerina/build.gradle b/ballerina/build.gradle index 8e7f8f8..0bb111e 100644 --- a/ballerina/build.gradle +++ b/ballerina/build.gradle @@ -1,18 +1,7 @@ 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 - MQTT Package' @@ -39,8 +28,6 @@ def stripBallerinaExtensionVersion(String extVersion) { } } -apply plugin: 'io.ballerina.plugin' - ballerina { packageOrganization = packageOrg module = packageName diff --git a/build.gradle b/build.gradle index cef6916..b7fdef0 100644 --- a/build.gradle +++ b/build.gradle @@ -56,9 +56,15 @@ subprojects { configurations { ballerinaStdLibs + jbalTools } dependencies { + /* JBallerina Tools */ + jbalTools ("org.ballerinalang:jballerina-tools:${ballerinaLangVersion}") { + transitive = false + } + /* Standard libraries */ ballerinaStdLibs "io.ballerina.stdlib:time-ballerina:${stdlibTimeVersion}" ballerinaStdLibs "io.ballerina.stdlib:log-ballerina:${stdlibLogVersion}" diff --git a/compiler-plugin-tests/build.gradle b/compiler-plugin-tests/build.gradle index fa00f33..8a864f0 100644 --- a/compiler-plugin-tests/build.gradle +++ b/compiler-plugin-tests/build.gradle @@ -27,7 +27,7 @@ description = 'Ballerina - MQTT Compiler Plugin Tests' dependencies { checkstyle project(':checkstyle') - checkstyle "com.puppycrawl.tools:checkstyle:${puppycrawlCheckstyleVersion}" + checkstyle "com.puppycrawl.tools:checkstyle:${checkstylePluginVersion}" testImplementation project(":mqtt-compiler-plugin") testImplementation group: 'org.ballerinalang', name: 'ballerina-lang', version: "${ballerinaLangVersion}" @@ -42,7 +42,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 6c1f1d1..b62236e 100644 --- a/compiler-plugin/build.gradle +++ b/compiler-plugin/build.gradle @@ -26,7 +26,7 @@ description = 'Ballerina - MQTT 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-tools-api', version: "${ballerinaLangVersion}" @@ -39,7 +39,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/gradle.properties b/gradle.properties index 45739de..6b72c89 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,6 @@ shadowJarPluginVersion=8.1.1 downloadPluginVersion=5.4.0 releasePluginVersion=2.8.0 ballerinaGradlePluginVersion=2.3.0 -puppycrawlCheckstyleVersion=10.12.0 testngVersion=7.6.1 gsonVersion=2.8.8 jacocoVersion=0.8.10 diff --git a/settings.gradle b/settings.gradle index 141bcac..54e3cdd 100644 --- a/settings.gradle +++ b/settings.gradle @@ -13,6 +13,18 @@ pluginManagement { 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") + } + } } }