diff --git a/ballerina/build.gradle b/ballerina/build.gradle index d15c443..9753b50 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 @@ -104,6 +91,8 @@ publishing { updateTomlFiles.dependsOn unpackJballerinaTools +test.dependsOn ":${packageName}-native:build" + build.dependsOn "generatePomFileForMavenPublication" build.dependsOn ":${packageName}-native:build" build.dependsOn unpackJballerinaTools 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 26ae25e..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 -ballerinaGradlePluginVersion=2.0.1 + +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" }