Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Convention Plugins and Version Catalog #43392

Merged
merged 4 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions ballerina-shell/modules/shell-cli/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
* under the License.
*/

apply from: "$rootDir/gradle/javaProject.gradle"
apply from: "$rootDir/gradle/ballerinaLangLibLoad.gradle"
plugins {
id 'javaProject'
id 'ballerinaLangLibLoad'
}

description = 'Ballerina - Ballerina Shell CLI'

Expand All @@ -26,12 +28,12 @@ group = 'io.ballerina'
dependencies {
implementation project(":ballerina-shell:shell-core")
implementation project(':ballerina-parser')
implementation("org.jline:jline:${project.jlineVersion}")
implementation libs.jline
implementation project(':ballerina-lang')
implementation project(':ballerina-tools-api')

testImplementation('org.testng:testng')
implementation 'com.google.code.gson:gson:2.10.1'
testImplementation libs.testng
implementation libs.gson
}

compileJava {
Expand Down
12 changes: 7 additions & 5 deletions ballerina-shell/modules/shell-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
* under the License.
*/

apply from: "$rootDir/gradle/javaProject.gradle"
apply from: "$rootDir/gradle/ballerinaLangLibLoad.gradle"
plugins {
id 'javaProject'
id 'ballerinaLangLibLoad'
}

description = 'Ballerina - Ballerina Shell'

Expand All @@ -30,10 +32,10 @@ dependencies {
implementation project(':ballerina-tools-api')
implementation project(':ballerina-runtime')
implementation project(':identifier-util')
implementation 'com.github.spullara.mustache.java:compiler'
implementation libs.mustache.java.compiler

testImplementation('org.testng:testng')
testImplementation('com.google.code.gson:gson')
testImplementation libs.testng
testImplementation libs.gson
}

test {
Expand Down
8 changes: 5 additions & 3 deletions ballerina-shell/modules/shell-rt/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@
* under the License.
*/

apply from: "$rootDir/gradle/javaProject.gradle"
apply from: "$rootDir/gradle/ballerinaLangLibLoad.gradle"
plugins {
id 'javaProject'
id 'ballerinaLangLibLoad'
}

description = 'Ballerina - Ballerina Shell Runtime Dependencies'

group = 'io.ballerina'

dependencies {
testImplementation('org.testng:testng')
testImplementation libs.testng
}

test {
Expand Down
8 changes: 5 additions & 3 deletions benchmarks/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@
* limitations under the License.
*
*/

apply from: "$rootDir/gradle/javaProject.gradle"

plugins {
id 'javaProject'
}

dependencies {
// compile project(':ballerina')
implementation 'com.github.chewiebug:gcviewer'
implementation libs.chewiebug.gcviewer
}

description = 'Ballerina - Microbenchmarks'
13 changes: 6 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
plugins {
id 'base'
id "com.github.spotbugs" version "${githubSpotbugsVersion}"
id "com.dorongold.task-tree" version "${dorongoldTaskTreeVersion}"
id "com.github.johnrengelman.shadow" version "${githubJohnrengelmanShadowVersion}"
alias libs.plugins.spotbugs
alias libs.plugins.dorongold.task.tree
alias libs.plugins.github.johnrengelman.shadow
id 'maven-publish'
id "net.researchgate.release" version "${researchgateReleaseVersion}"
alias libs.plugins.researchgate.release
id 'jacoco'
id "org.sonarqube" version "${sonarqubeGradlePluginVersion}"
alias libs.plugins.sonarqube
id 'repositories'
}

apply from: "$rootDir/gradle/repositories.gradle"

allprojects {
tasks.withType(JavaCompile).configureEach {
options.fork = true
Expand Down
12 changes: 7 additions & 5 deletions bvm/ballerina-profiler/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,19 @@
* under the License.
*/

apply from: "$rootDir/gradle/javaProject.gradle"
plugins {
id 'javaProject'
}

configurations {
runtimeClasspath.transitive = false
}

dependencies {
implementation "org.ow2.asm:asm:${project.ow2AsmVersion}"
implementation "org.ow2.asm:asm-commons:${project.ow2AsmCommonsVersion}"
implementation "com.google.code.gson:gson:${project.gsonVersion}"
implementation "commons-io:commons-io:${project.commonsIoVersion}"
implementation libs.ow2.asm
implementation libs.ow2.asm.commons
implementation libs.gson
implementation libs.commons.io
implementation project(':identifier-util')
implementation project(':ballerina-runtime')
}
Expand Down
49 changes: 24 additions & 25 deletions bvm/ballerina-rt/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ plugins {
id 'java-library'
id 'checkstyle'
id 'com.github.spotbugs'
id 'repositories'
}

apply from: "$rootDir/gradle/repositories.gradle"

configurations {
dist {
transitive false
Expand Down Expand Up @@ -85,38 +84,38 @@ dependencies {

// Third party jars
// config
dist "org.slf4j:slf4j-jdk14:${project.slf4jJdk14Version}"
dist "org.slf4j:slf4j-api:${project.slf4jApiVersion}"
dist "org.apache.commons:commons-lang3:${project.apacheCommonsLang3Version}"
dist "org.apache.commons:commons-text:${project.apacheCommonsTextVersion}"
dist "com.moandjiezana.toml:toml4j:${project.moandjiezanaToml4jVersion}"
dist "com.fasterxml.woodstox:woodstox-core:${project.fasterxmlWoodstoxCoreVersion}"
dist "org.codehaus.woodstox:stax2-api:${project.codehausWoodstoxStax2ApiVersion}"
dist libs.slf4j.jdk14
dist libs.slf4j.api
dist libs.apache.commons.lang3
dist libs.apache.commons.text
dist libs.toml4j
dist libs.fasterxml.woodstox.core
dist libs.codehaus.woodstox.stax2.api

// runtime
dist "org.apache.ws.commons.axiom:axiom-c14n:${project.apacheCommonsAxiomC14nVersion}"
dist "org.apache.ws.commons.axiom:axiom-impl:${project.apacheCommonsAxiomImplVersion}"
dist "org.apache.ws.commons.axiom:axiom-api:${project.apacheCommonsAxiomApiVersion}"
dist "org.apache.ws.commons.axiom:axiom-dom:${project.apacheCommonsAxiomDomVersion}"
dist "commons-logging:commons-logging:${project.commonsLoggingVersion}"
dist "io.opentelemetry:opentelemetry-api:${project.openTelemetryApiVersion}"
dist "io.opentelemetry:opentelemetry-context:${project.openTelemetryContextVersion}"
dist "org.awaitility:awaitility:${project.awaitilityVersion}"
dist "org.hdrhistogram:HdrHistogram:${project.hdrHistogramVersion}"
dist libs.apache.commons.axiom.c14n
dist libs.apache.commons.axiom.impl
dist libs.apache.commons.axiom.api
dist libs.apache.commons.axiom.dom
dist libs.commons.logging
dist libs.open.telemetry.api
dist libs.open.telemetry.context
dist libs.awaitility
dist libs.hdr.histogram

// observability extensions
//// metrics
dist project(':metrics-extensions:ballerina-metrics-extension')

dist "com.google.code.gson:gson:${project.gsonVersion}"
dist libs.gson

// Transaction related third party jars
dist "com.atomikos:transactions-jta:${project.atomikosTransactionsJtaVersion}"
dist "com.atomikos:atomikos-util:${project.atomikosUtilVersion}"
dist "com.atomikos:transactions-api:${project.atomikosTransactionsApiVersion}"
dist "com.atomikos:transactions-jdbc:${project.atomikosTransactionsJdbcVersion}"
dist "com.atomikos:transactions:${project.atomikosTransactionsVersion}"
dist "javax.transaction:javax.transaction-api:${project.javaxTransactionApiVersion}"
dist libs.atomikos.transactions.jta
dist libs.atomikos.util
dist libs.atomikos.transactions.api
dist libs.atomikos.transactions.jdbc
dist libs.atomikos.transactions
dist libs.javax.transaction.api

// debugger runtime helpers
dist project(':debug-adapter:debug-adapter-runtime')
Expand Down
18 changes: 10 additions & 8 deletions bvm/ballerina-runtime/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,30 @@
*
*/

apply from: "$rootDir/gradle/javaProject.gradle"
plugins {
id 'javaProject'
}

dependencies {
implementation("org.apache.ws.commons.axiom:axiom-impl:${project.apacheCommonsAxiomImplVersion}") {
implementation(libs.apache.commons.axiom.impl) {
exclude group: 'org.apache.ws.commons.axiom', module: 'axiom-api'
}

implementation('org.apache.ws.commons.axiom:axiom-api') {
implementation(libs.apache.commons.axiom.api) {
exclude group: 'org.apache.geronimo.specs', module: 'geronimo-stax-api_1.0_spec'
exclude group: 'jaxen', module: 'jaxen'
}
implementation 'org.apache.commons:commons-text'
implementation 'io.opentelemetry:opentelemetry-api'
implementation("com.atomikos:transactions-jta:${project.atomikosTransactionsJtaVersion}") {
implementation libs.apache.commons.text
implementation libs.open.telemetry.api
implementation(libs.atomikos.transactions.jta) {
exclude group: 'org.hibernate', module: 'hibernate'
}
implementation "javax.transaction:javax.transaction-api:${project.javaxTransactionApiVersion}"
implementation libs.javax.transaction.api
implementation project(':toml-parser')
implementation project(':ballerina-tools-api')
implementation project(':identifier-util')

testImplementation 'org.testng:testng'
testImplementation libs.testng
}


Expand Down
42 changes: 20 additions & 22 deletions cli/ballerina-cli/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
*
*/

apply from: "$rootDir/gradle/javaProject.gradle"
apply from: "$rootDir/gradle/ballerinaLangLibLoad.gradle"
plugins {
id 'javaProject'
id 'ballerinaLangLibLoad'
}

configurations {
testImplementation.exclude group: 'org.slf4j', module: 'slf4j-log4j12'
Expand All @@ -38,12 +40,12 @@ dependencies {
implementation project(':ballerina-runtime')
implementation project(':ballerina-tools-api')
implementation project(':central-client')
implementation 'info.picocli:picocli'
implementation("org.apache.commons:commons-compress:${project.apacheCommonsCompressVersion}") {
implementation libs.picocli
implementation(libs.apache.commons.compress) {
exclude group: 'commons-codec', module: 'commons-codec'
exclude group: 'org.apache.commons', module: 'commons-lang3'
}
implementation "com.google.code.gson:gson:${project.gsonVersion}"
implementation libs.gson
implementation project(':docerina')
implementation project(':testerina:testerina-core')
implementation project(':testerina:testerina-runtime')
Expand All @@ -52,23 +54,19 @@ dependencies {
implementation project(':toml-parser')
implementation project(':identifier-util')
testImplementation project(':ballerina-test-utils')
implementation 'org.ow2.asm:asm'
implementation "org.ow2.asm:asm-commons:${project.ow2AsmCommonsVersion}"
implementation "org.jacoco:org.jacoco.core:${project.jacocoVersion}"
implementation "org.jacoco:org.jacoco.report:${project.jacocoVersion}"
implementation group: 'org.jacoco', name: 'org.jacoco.core', version: "${project.jacocoVersion}"
implementation group: 'org.jacoco', name: 'org.jacoco.report', version: "${project.jacocoVersion}"
implementation group: 'org.ow2.asm', name: 'asm', version: "${project.ow2AsmVersion}"
implementation group: 'org.ow2.asm', name: 'asm-commons', version: "${project.ow2AsmCommonsVersion}"
implementation group: 'org.ow2.asm', name: 'asm-tree', version: "${project.ow2AsmTreeVersion}"
implementation 'commons-io:commons-io'

testImplementation "org.testng:testng:${project.testngVersion}"
testImplementation "org.mockito:mockito-core:${project.mockitoCoreVersion}"
testImplementation 'org.mockito:mockito-testng'
testImplementation 'commons-io:commons-io'
testImplementation "commons-codec:commons-codec:${project.commonsCodecVersion}"
testImplementation "org.jline:jline:${project.jlineVersion}"
implementation libs.ow2.asm
implementation libs.ow2.asm.commons
implementation libs.ow2.asm.tree
implementation libs.jacoco.core
implementation libs.jacoco.report
implementation libs.commons.io

testImplementation libs.testng
testImplementation libs.mockito.core
testImplementation libs.mockito.testng
testImplementation libs.commons.io
testImplementation libs.commons.codec
testImplementation libs.jline

distributionBala project(path: ':ballerina-langlib:test', configuration: 'distributionBala')
distributionBala project(path: ':testerina:testerina-core', configuration: 'distributionBala')
Expand Down
30 changes: 16 additions & 14 deletions cli/central-client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
*
*/

apply from: "$rootDir/gradle/javaProject.gradle"
apply from: "$rootDir/gradle/ballerinaLangLibLoad.gradle"
plugins {
id 'javaProject'
id 'ballerinaLangLibLoad'
}

configurations {
birJar
Expand All @@ -30,19 +32,19 @@ configurations {

dependencies {
implementation project(':ballerina-runtime')
implementation 'me.tongfei:progressbar'
implementation 'com.google.code.gson:gson'
implementation 'com.google.code.findbugs:jsr305'
implementation 'com.github.zafarkhaja:java-semver'
implementation 'commons-io:commons-io'
implementation 'com.squareup.okhttp3:okhttp'
implementation 'com.squareup.okio:okio'
implementation libs.tongfei.progressbar
implementation libs.gson
implementation libs.findbugs.jsr305
implementation libs.zafarkhaja.jsemver
implementation libs.commons.io
implementation libs.squareup.okhttp
implementation libs.squareup.okio

testImplementation "com.squareup.okhttp3:mockwebserver:${mockWebserverVersion}"
testImplementation "org.mockito:mockito-core:${mockitoCoreVersion}"
testImplementation "org.mockito:mockito-testng:${mockitoTestNGVersion}"
testImplementation 'org.testng:testng'
testImplementation 'org.awaitility:awaitility'
testImplementation libs.squareup.mock.webserver
testImplementation libs.mockito.core
testImplementation libs.mockito.testng
testImplementation libs.testng
testImplementation libs.awaitility
}

tasks.register('createTestDistributionCache', Copy) {
Expand Down
Loading