diff --git a/examples/build.gradle.kts b/examples/build.gradle.kts index 6afd9c21..f44b65da 100644 --- a/examples/build.gradle.kts +++ b/examples/build.gradle.kts @@ -17,7 +17,7 @@ plugins { } kotlin { - jvmToolchain(11) + jvmToolchain(8) } dependencies { diff --git a/examples/src/main/java/io/zenoh/ZGet.java b/examples/src/main/java/io/zenoh/ZGet.java index a8dbb262..53a3094a 100644 --- a/examples/src/main/java/io/zenoh/ZGet.java +++ b/examples/src/main/java/io/zenoh/ZGet.java @@ -32,7 +32,7 @@ public static void main(String[] args) throws ZenohException, InterruptedExcepti assert receiver != null; while (true) { Optional wrapper = receiver.take(); - if (wrapper.isEmpty()) { + if (!wrapper.isPresent()) { break; } Reply reply = wrapper.get(); diff --git a/examples/src/main/java/io/zenoh/ZQueryable.java b/examples/src/main/java/io/zenoh/ZQueryable.java index c5a9c872..8ccef6b9 100644 --- a/examples/src/main/java/io/zenoh/ZQueryable.java +++ b/examples/src/main/java/io/zenoh/ZQueryable.java @@ -44,7 +44,7 @@ public static void main(String[] args) throws ZenohException, InterruptedExcepti private static void handleRequests(BlockingQueue> receiver, KeyExpr keyExpr) throws InterruptedException { while (true) { Optional wrapper = receiver.take(); - if (wrapper.isEmpty()) { + if (!wrapper.isPresent()) { break; } Query query = wrapper.get(); diff --git a/examples/src/main/java/io/zenoh/ZSub.java b/examples/src/main/java/io/zenoh/ZSub.java index 883139f7..08171083 100644 --- a/examples/src/main/java/io/zenoh/ZSub.java +++ b/examples/src/main/java/io/zenoh/ZSub.java @@ -35,7 +35,7 @@ public static void main(String[] args) throws ZenohException, InterruptedExcepti System.out.println("Press CTRL-C to quit..."); while (true) { Optional wrapper = receiver.take(); - if (wrapper.isEmpty()) { + if (!wrapper.isPresent()) { break; } Sample sample = wrapper.get(); diff --git a/zenoh-java/build.gradle.kts b/zenoh-java/build.gradle.kts index f5841d0a..b1cc1e6e 100644 --- a/zenoh-java/build.gradle.kts +++ b/zenoh-java/build.gradle.kts @@ -37,10 +37,10 @@ if (androidEnabled) { } kotlin { - jvmToolchain(11) + jvmToolchain(8) jvm { compilations.all { - kotlinOptions.jvmTarget = "11" + kotlinOptions.jvmTarget = "1.8" } testRuns["test"].executionTask.configure { val zenohPaths = "../zenoh-jni/target/$buildMode" @@ -167,17 +167,17 @@ enum class BuildMode { fun Project.configureAndroid() { extensions.configure("android") { namespace = "io.zenoh" - compileSdk = 30 + compileSdk = 27 ndkVersion = "26.0.10792818" defaultConfig { - minSdk = 30 + minSdk = 27 } compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } buildTypes {