From c7c94e2a213a05ee92eb50d914b818428cb29c45 Mon Sep 17 00:00:00 2001 From: Darius Maitia Date: Mon, 6 Jan 2025 15:35:04 -0300 Subject: [PATCH] Disabling java code for android publications (#171) --- zenoh-java/build.gradle.kts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/zenoh-java/build.gradle.kts b/zenoh-java/build.gradle.kts index 12fde33..d8868a8 100644 --- a/zenoh-java/build.gradle.kts +++ b/zenoh-java/build.gradle.kts @@ -50,7 +50,11 @@ kotlin { val zenohPaths = "../zenoh-jni/target/$buildMode" jvmArgs("-Djava.library.path=$zenohPaths") } - withJava() + if (!androidEnabled) { + withJava() // Adding java to a kotlin lib targeting android is incompatible + // The java code is only meant for testing and is non-critical for the android publication. + // Therefore, when enabling android we disable the java code. + } } if (androidEnabled) { androidTarget {