Skip to content

Commit

Permalink
Downgrade Java and minSdkVersion to broaden device compatibility
Browse files Browse the repository at this point in the history
Signed-off-by: Gergely Morva <[email protected]>
  • Loading branch information
morvagergely committed Dec 17, 2024
1 parent 156465d commit d8de9a3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ plugins {
}

kotlin {
jvmToolchain(11)
jvmToolchain(8)
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion examples/src/main/java/io/zenoh/ZGet.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static void main(String[] args) throws ZenohException, InterruptedExcepti
assert receiver != null;
while (true) {
Optional<Reply> wrapper = receiver.take();
if (wrapper.isEmpty()) {
if (!wrapper.isPresent()) {
break;
}
Reply reply = wrapper.get();
Expand Down
2 changes: 1 addition & 1 deletion examples/src/main/java/io/zenoh/ZQueryable.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static void main(String[] args) throws ZenohException, InterruptedExcepti
private static void handleRequests(BlockingQueue<Optional<Query>> receiver, KeyExpr keyExpr) throws InterruptedException {
while (true) {
Optional<Query> wrapper = receiver.take();
if (wrapper.isEmpty()) {
if (!wrapper.isPresent()) {
break;
}
Query query = wrapper.get();
Expand Down
2 changes: 1 addition & 1 deletion examples/src/main/java/io/zenoh/ZSub.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public static void main(String[] args) throws ZenohException, InterruptedExcepti
System.out.println("Press CTRL-C to quit...");
while (true) {
Optional<Sample> wrapper = receiver.take();
if (wrapper.isEmpty()) {
if (!wrapper.isPresent()) {
break;
}
Sample sample = wrapper.get();
Expand Down
12 changes: 6 additions & 6 deletions zenoh-java/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -167,17 +167,17 @@ enum class BuildMode {
fun Project.configureAndroid() {
extensions.configure<com.android.build.gradle.LibraryExtension>("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 {
Expand Down

0 comments on commit d8de9a3

Please sign in to comment.