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

Fix tasks in Gradle build files #2

Merged
merged 12 commits into from
Apr 5, 2024
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ballerina Avro Module

[![Build](https://github.com/ballerina-platform/module-ballerina-avro/actions/workflows/build-timestamped-master.yml)](https://github.com/ballerina-platform/module-ballerina-avro/actions/workflows/build-timestamped-master.yml)
[![Build](https://github.com/ballerina-platform/module-ballerina-avro/actions/workflows/build-timestamped-master.yml/badge.svg)](https://github.com/ballerina-platform/module-ballerina-avro/actions/workflows/build-timestamped-master.yml)
[![codecov](https://codecov.io/gh/ballerina-platform/module-ballerina-avro/branch/master/graph/badge.svg)](https://codecov.io/gh/ballerina-platform/module-ballerina-avro)
[![Trivy](https://github.com/ballerina-platform/module-ballerina-avro/actions/workflows/trivy-scan.yml/badge.svg)](https://github.com/ballerina-platform/module-ballerina-avro/actions/workflows/trivy-scan.yml)
[![GraalVM Check](https://github.com/ballerina-platform/module-ballerina-avro/actions/workflows/build-with-bal-test-graalvm.yml/badge.svg)](https://github.com/ballerina-platform/module-ballerina-avro/actions/workflows/build-with-bal-test-graalvm.yml)
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also need to define the ballerinaStdlibs configuration for the subprojects here.

Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ subprojects {
jbalTools ("org.ballerinalang:jballerina-tools:${ballerinaLangVersion}") {
transitive = false
}
ballerinaStdLibs "io.ballerina.stdlib:io-ballerina:${stdlibIoVersion}"
}
}

Expand Down
17 changes: 10 additions & 7 deletions examples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ def ballerinaDist = "${project.rootDir}/target/ballerina-runtime"
def examples = ["order-processing-system"]
def graalvmFlag = ""

dependencies {
implementation group: 'org.ballerinalang', name: 'ballerina-lang', version: "${ballerinaLangVersion}"
}

clean {
tasks.register('clean') {
examples.forEach { example ->
delete "${projectDir}/${example}/target"
delete "${projectDir}/${example}/Dependencies.toml"
Expand Down Expand Up @@ -85,7 +81,14 @@ task buildExamples {
}
}

task build {
dependsOn buildExamples

}

task test {
dependsOn testExamples
}

buildExamples.dependsOn ":avro-ballerina:build"
testExamples.dependsOn ":avro-ballerina:build"
test.dependsOn testExamples
build.dependsOn buildExamples
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ releasePluginVersion=2.8.0
ballerinaGradlePluginVersion=2.2.4

# Dependencies
stdlibIoVersion=1.6.0
avroVersion=1.11.3
avroJacksonVersion=1.8.2
jacksonVersion=2.17.0
Loading