Skip to content

Commit

Permalink
Fix build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ThisaruGuruge authored Jan 31, 2025
1 parent 7854142 commit a04bc50
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 31 deletions.
17 changes: 2 additions & 15 deletions ballerina/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -56,8 +45,6 @@ def stripBallerinaExtensionVersion(String extVersion) {
}
}

apply plugin: 'io.ballerina.plugin'

ballerina {
packageOrganization = packageOrg
module = packageName
Expand Down
15 changes: 11 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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}"
Expand Down
4 changes: 2 additions & 2 deletions compiler-plugin-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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")]
}
Expand Down
4 changes: 2 additions & 2 deletions compiler-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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")]
}
Expand Down
15 changes: 8 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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.3.0
gsonVersion=2.8.8
lz4Version=1.3.0
marshallingVersion=2.0.5.Final
Expand Down
2 changes: 1 addition & 1 deletion native/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
21 changes: 21 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down

0 comments on commit a04bc50

Please sign in to comment.