Skip to content

Commit 1209c3b

Browse files
authored
Merge pull request #3 from ballerina-platform/initial-impl
Update gradle tasks to fix issues
2 parents ad4d0c9 + 6c656ef commit 1209c3b

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

ballerina/build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ clean {
5555
delete "${project.projectDir}/target"
5656
delete "${project.projectDir}/Ballerina.lock"
5757
delete "${project.projectDir}/ballerina-internal.log"
58+
delete "${project.projectDir}/build"
59+
doLast {
60+
// Force cleanup with retry
61+
ant.delete(dir: 'ballerina/build', failonerror: false, includeemptydirs: true)
62+
}
5863
}
5964

6065
task copyExternalJarsToLib(type: Copy) {

native/build.gradle

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,12 @@
1515
*/
1616

1717
plugins {
18-
id 'java'
19-
id 'checkstyle'
18+
id 'java-library'
2019
}
2120

2221
description = 'Ballerina - Moesif Extension - Native Module'
2322

2423
dependencies {
25-
checkstyle project(':build-config:checkstyle')
26-
checkstyle "com.puppycrawl.tools:checkstyle:${checkstylePluginVersion}"
27-
2824
implementation "org.ballerinalang:ballerina-runtime:${ballerinaLangVersion}"
2925
implementation "io.opentelemetry:opentelemetry-context:${openTelemetryVersion}"
3026
implementation "io.opentelemetry:opentelemetry-sdk-trace:${openTelemetrySDKVersion}"
@@ -36,26 +32,14 @@ dependencies {
3632
implementation "com.squareup.okhttp3:okhttp:4.12.0"
3733
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.9.23'
3834
implementation "com.squareup.okio:okio:3.9.0"
39-
4035
implementation "io.opentelemetry:opentelemetry-exporter-otlp-common:${openTelemetryExporterVersion}"
36+
4137
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.2'
4238
testImplementation 'org.mockito:mockito-core:5.1.1'
4339
testImplementation 'org.mockito:mockito-junit-jupiter:5.1.1'
4440
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
4541
}
4642

47-
checkstyle {
48-
toolVersion '7.8.2'
49-
configFile rootProject.file("build-config/checkstyle/build/checkstyle.xml")
50-
}
51-
52-
def excludePattern = '**/module-info.java'
53-
tasks.withType(Checkstyle) {
54-
exclude excludePattern
55-
}
56-
57-
checkstyleMain.dependsOn(":build-config:checkstyle:downloadCheckstyleRuleFiles")
58-
5943
compileJava {
6044
doFirst {
6145
options.compilerArgs = [
@@ -65,6 +49,18 @@ compileJava {
6549
}
6650
}
6751

52+
compileTestJava {
53+
// Don't use module path for test compilation
54+
options.compilerArgs = []
55+
}
56+
57+
test {
58+
useJUnitPlatform()
59+
testLogging {
60+
events "passed", "skipped", "failed", "standardOut", "standardError"
61+
}
62+
}
63+
6864
jar {
6965
manifest {
7066
attributes('Implementation-Title': project.name, 'Implementation-Version': project.version)

0 commit comments

Comments
 (0)