diff --git a/ballerina/build.gradle b/ballerina/build.gradle index 828ec183..2181ee55 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:${ballerinaGradlePluginVersion}" - } +plugins { + id 'io.ballerina.plugin' } description = 'Ballerina - TCP 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 b4a37ecc..f07fe3c6 100644 --- a/build.gradle +++ b/build.gradle @@ -16,10 +16,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 { @@ -61,8 +61,15 @@ allprojects { 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:log-ballerina:${stdlibLogVersion}" diff --git a/compiler-plugin-tests/build.gradle b/compiler-plugin-tests/build.gradle index 4976f78e..02de183e 100644 --- a/compiler-plugin-tests/build.gradle +++ b/compiler-plugin-tests/build.gradle @@ -26,7 +26,7 @@ description = 'Ballerina - TCP 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}" @@ -42,7 +42,7 @@ tasks.withType(Checkstyle) { } checkstyle { - toolVersion "${project.checkstyleToolVersion}" + 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 834df92f..29fa5ea7 100644 --- a/compiler-plugin/build.gradle +++ b/compiler-plugin/build.gradle @@ -26,7 +26,7 @@ description = 'Ballerina - TCP 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}" @@ -40,7 +40,7 @@ tasks.withType(Checkstyle) { } checkstyle { - toolVersion "${project.checkstyleToolVersion}" + 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 1d60daf7..958c68ff 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,16 +2,17 @@ org.gradle.caching=true group=io.ballerina.stdlib version=1.12.0-SNAPSHOT ballerinaLangVersion=2201.11.0-20250127-101700-a4b67fe5 -puppycrawlCheckstyleVersion=10.12.0 -githubJohnrengelmanShadowVersion=8.1.1 -checkstyleToolVersion=10.12.0 -githubSpotbugsVersion=6.0.18 + +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 nettyVersion=4.1.115.Final -underCouchDownloadVersion=5.4.0 -researchgateReleaseVersion=2.8.0 slf4jVersion=1.7.30 -ballerinaGradlePluginVersion=2.0.1 gsonVersion=2.8.8 lz4Version=1.3.0 marshallingVersion=2.0.5.Final diff --git a/native/build.gradle b/native/build.gradle index 457daeb0..0268f799 100644 --- a/native/build.gradle +++ b/native/build.gradle @@ -25,7 +25,7 @@ description = 'Ballerina - TCP Java Utils' dependencies { checkstyle project(':checkstyle') - checkstyle "com.puppycrawl.tools:checkstyle:${puppycrawlCheckstyleVersion}" + checkstyle "com.puppycrawl.tools:checkstyle:${checkstylePluginVersion}" implementation group: 'io.netty', name: 'netty-handler', version: "${nettyVersion}" implementation group: 'io.netty', name: 'netty-buffer', version: "${nettyVersion}" diff --git a/settings.gradle b/settings.gradle index ca81e56c..41490cdc 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" }