From aae98fd2db7f65fc60e08efaac8e8f2c0a76a409 Mon Sep 17 00:00:00 2001 From: Thisaru Guruge Date: Fri, 31 Jan 2025 16:27:57 +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 26ae25e..a45a902 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,4 +7,4 @@ githubJohnrengelmanShadowVersion=8.1.1 underCouchDownloadVersion=5.4.0 researchgateReleaseVersion=2.8.0 puppycrawlCheckstyleVersion=10.12.0 -ballerinaGradlePluginVersion=2.0.1 +ballerinaGradlePluginVersion=2.3.0 From 609d899faa01dce6469ca5a33cb91178a73e563d Mon Sep 17 00:00:00 2001 From: Thisaru Guruge Date: Fri, 31 Jan 2025 17:16:47 +0530 Subject: [PATCH 2/3] Fix build scripts --- ballerina/build.gradle | 17 ++--------------- build.gradle | 24 +++++++++++++++++++----- gradle.properties | 11 ++++++----- native/build.gradle | 4 ++-- settings.gradle | 22 ++++++++++++++++++++++ 5 files changed, 51 insertions(+), 27 deletions(-) diff --git a/ballerina/build.gradle b/ballerina/build.gradle index d15c443..f35334a 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 - Time Ballerina Generator' @@ -54,8 +43,6 @@ def stripBallerinaExtensionVersion(String extVersion) { } } -apply plugin: 'io.ballerina.plugin' - ballerina { packageOrganization = packageOrg module = packageName diff --git a/build.gradle b/build.gradle index 85d5f27..eec5dd0 100644 --- a/build.gradle +++ b/build.gradle @@ -16,14 +16,14 @@ */ 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" } ext.ballerinaLangVersion = project.ballerinaLangVersion -ext.puppycrawlCheckstyleVersion = project.puppycrawlCheckstyleVersion +ext.checkstylePluginVersion = project.checkstylePluginVersion allprojects { group = project.group @@ -61,6 +61,20 @@ allprojects { } } +subprojects { + configurations { + ballerinaStdLibs + jbalTools + } + + dependencies { + /* JBallerina Tools */ + jbalTools ("org.ballerinalang:jballerina-tools:${ballerinaLangVersion}") { + transitive = false + } + } +} + def moduleVersion = project.version.replace("-SNAPSHOT", "") release { diff --git a/gradle.properties b/gradle.properties index a45a902..469f9eb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,9 +2,10 @@ org.gradle.caching=true group=io.ballerina.stdlib version=2.6.0-SNAPSHOT ballerinaLangVersion=2201.11.0-20250127-101700-a4b67fe5 -githubSpotbugsVersion=6.0.18 -githubJohnrengelmanShadowVersion=8.1.1 -underCouchDownloadVersion=5.4.0 -researchgateReleaseVersion=2.8.0 -puppycrawlCheckstyleVersion=10.12.0 + +spotbugsPluginVersion=6.0.18 +shadowJarPluginVersion=8.1.1 +downloadPluginVersion=5.4.0 +releasePluginVersion=2.8.0 +checkstylePluginVersion=10.12.0 ballerinaGradlePluginVersion=2.3.0 diff --git a/native/build.gradle b/native/build.gradle index 5338537..edb92a7 100644 --- a/native/build.gradle +++ b/native/build.gradle @@ -25,13 +25,13 @@ description = 'Ballerina - Time Java Utils' dependencies { checkstyle project(':checkstyle') - checkstyle "com.puppycrawl.tools:checkstyle:${puppycrawlCheckstyleVersion}" + checkstyle "com.puppycrawl.tools:checkstyle:${checkstylePluginVersion}" implementation group: 'org.ballerinalang', name: 'ballerina-runtime', version: "${ballerinaLangVersion}" } checkstyle { - toolVersion '10.12.0' + toolVersion "${checkstylePluginVersion}" configFile rootProject.file("build-config/checkstyle/build/checkstyle.xml") configProperties = ["suppressionFile" : file("${rootDir}/build-config/checkstyle/build/suppressions.xml")] } diff --git a/settings.gradle b/settings.gradle index 06bbbb8..7dc5076 100644 --- a/settings.gradle +++ b/settings.gradle @@ -6,6 +6,28 @@ * Detailed information about configuring a multi-project build in Gradle can be found * in the user manual at https://docs.gradle.org/6.4/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.2" } From c94c30d5d07c289084d1b311a8560fbb48b88179 Mon Sep 17 00:00:00 2001 From: TharmiganK Date: Sat, 1 Feb 2025 12:16:52 +0530 Subject: [PATCH 3/3] Add native build as test dependency --- ballerina/build.gradle | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ballerina/build.gradle b/ballerina/build.gradle index f35334a..9753b50 100644 --- a/ballerina/build.gradle +++ b/ballerina/build.gradle @@ -91,6 +91,8 @@ publishing { updateTomlFiles.dependsOn unpackJballerinaTools +test.dependsOn ":${packageName}-native:build" + build.dependsOn "generatePomFileForMavenPublication" build.dependsOn ":${packageName}-native:build" build.dependsOn unpackJballerinaTools