Skip to content

Commit

Permalink
CI workflow: fix relative cargo.toml path after gradle upgrade to 8.12 (
Browse files Browse the repository at this point in the history
#340)

* CI workflow: fix relative cargo.toml path after gradle upgrade to 8.12

* Fix relative cargo.toml path for zenoh examples after gradle upgrade to 8.12

* Fixes on gradle files for test executions
  • Loading branch information
DariusIMP authored Jan 15, 2025
1 parent 64593b7 commit 434a9af
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ buildscript {
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0")
classpath("org.mozilla.rust-android-gradle:plugin:0.9.3")
classpath("org.mozilla.rust-android-gradle:plugin:0.9.6")
classpath("com.android.tools.build:gradle:7.4.2")
}
}
Expand All @@ -30,7 +30,7 @@ plugins {
id("com.android.library") version "7.4.2" apply false
id("org.jetbrains.kotlin.android") version "1.9.10" apply false
id("org.jetbrains.kotlin.multiplatform") version "1.9.0" apply false
id("org.mozilla.rust-android-gradle.rust-android") version "0.9.3" apply false
id("org.mozilla.rust-android-gradle.rust-android") version "0.9.6" apply false
id("org.jetbrains.dokka") version "1.8.20" apply false
id("com.adarshr.test-logger") version "3.2.0" apply false
kotlin("plugin.serialization") version "1.9.0" apply false
Expand Down
2 changes: 1 addition & 1 deletion examples/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@ tasks {

tasks.register("CompileZenohJNI") {
project.exec {
commandLine("cargo", "build", "--release", "--manifest-path", "../zenoh-jni/Cargo.toml")
commandLine("cargo", "build", "--release", "--manifest-path", "./zenoh-jni/Cargo.toml")
}
}
7 changes: 1 addition & 6 deletions zenoh-kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ kotlin {
compilations.all {
kotlinOptions.jvmTarget = "11"
}
testRuns["test"].executionTask.configure {
val zenohPaths = "../zenoh-jni/target/$buildMode"
jvmArgs("-Djava.library.path=$zenohPaths")
}
}
if (androidEnabled) {
androidTarget {
Expand Down Expand Up @@ -177,7 +173,6 @@ tasks.withType<Test> {
// For them to work we need to specify the path to the native library as a system property and not as a jvmArg.
systemProperty("java.library.path", "../zenoh-jni/target/$buildMode")
}
useJUnitPlatform()
}

tasks.whenObjectAdded {
Expand Down Expand Up @@ -208,7 +203,7 @@ fun buildZenohJNI(mode: BuildMode = BuildMode.DEBUG) {
}

val result = project.exec {
commandLine(*(cargoCommand.toTypedArray()), "--manifest-path", "../zenoh-jni/Cargo.toml")
commandLine(*(cargoCommand.toTypedArray()), "--manifest-path", "./zenoh-jni/Cargo.toml")
}

if (result.exitValue != 0) {
Expand Down

0 comments on commit 434a9af

Please sign in to comment.