Skip to content

Commit

Permalink
re organize the gradle plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
daneshk committed Nov 27, 2024
1 parent 9831099 commit f1470f6
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 34 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:${project.ballerinaGradlePluginVersion}"
}
plugins {
id 'io.ballerina.plugin'
}

description = 'Ballerina - MSSQL Ballerina Generator'
Expand Down Expand Up @@ -57,8 +46,6 @@ def stripBallerinaExtensionVersion(String extVersion) {
}
}

apply plugin: 'io.ballerina.plugin'

ballerina {
packageOrganization = packageOrg
module = packageName
Expand Down
8 changes: 4 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-base"
id "com.github.johnrengelman.shadow"
id "de.undercouch.download"
id "net.researchgate.release"
}

description = 'Ballerina - MSSQL'
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 @@ -31,7 +31,7 @@ configurations {

dependencies {
checkstyle project(':checkstyle')
checkstyle "com.puppycrawl.tools:checkstyle:${puppycrawlCheckstyleVersion}"
checkstyle "com.puppycrawl.tools:checkstyle:${checkstylePluginVersion}"

jacocoRuntime "org.jacoco:org.jacoco.agent:0.8.6:runtime"

Expand Down Expand Up @@ -117,7 +117,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")]
}
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 - MSSQL 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 @@ -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")]
}
Expand Down
17 changes: 8 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
group=io.ballerina.stdlib
version=1.14.0-SNAPSHOT
ballerinaLangVersion=2201.11.0-20241121-075100-c4c87cbc

puppycrawlCheckstyleVersion=10.12.0
msSQLDriverVersion=12.8.1.jre11
checkstyleToolVersion=10.12.0
githubSpotbugsVersion=6.0.18
githubJohnrengelmanShadowVersion=8.1.0
underCouchDownloadVersion=5.4.0
researchgateReleaseVersion=2.8.0
testngVersion=7.6.1
checkstylePluginVersion=10.12.1
spotbugsPluginVersion=6.0.18
downloadPluginVersion=5.4.0
shadowJarPluginVersion=8.1.1
releasePluginVersion=2.8.0
ballerinaGradlePluginVersion=2.0.1

ballerinaLangVersion=2201.11.0-20241121-075100-c4c87cbc
msSQLDriverVersion=12.8.1.jre11
testngVersion=7.6.1

stdlibSqlVersion=1.15.0-20241127-162900-c57df5b

Expand Down
4 changes: 2 additions & 2 deletions native/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ configurations {
dependencies {
jacocoRuntime "org.jacoco:org.jacoco.agent:${jacoco.toolVersion}:runtime"
checkstyle project(":checkstyle")
checkstyle "com.puppycrawl.tools:checkstyle:${puppycrawlCheckstyleVersion}"
checkstyle "com.puppycrawl.tools:checkstyle:${checkstylePluginVersion}"

implementation group: 'org.ballerinalang', name: 'ballerina-runtime', version: "${ballerinaLangVersion}"
implementation group: 'io.ballerina.stdlib', name: 'sql-native', version: "${stdlibSqlVersion}"
Expand Down Expand Up @@ -99,7 +99,7 @@ task validateSpotbugs() {

checkstyle {
ignoreFailures = false
toolVersion "${checkstyleToolVersion}"
toolVersion "${checkstylePluginVersion}"
configFile file("${rootDir}/build-config/checkstyle/build/checkstyle.xml")
configProperties = ["suppressionFile" : file("${rootDir}/build-config/checkstyle/build/suppressions.xml")]
}
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-base" 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"
}
Expand Down

0 comments on commit f1470f6

Please sign in to comment.