From cc66a97dd2cf1507ef7f4a486fdc57d36bb93820 Mon Sep 17 00:00:00 2001 From: Eric Anderson Date: Mon, 27 Aug 2018 13:31:59 -0700 Subject: [PATCH] all: Swap to Java 7 source and bytecode Core and OkHttp are left with Java 6 for the moment. Once we resolve their issues they could be bumped as well. Updates #3961 --- build.gradle | 4 ++-- core/build.gradle | 6 ++++++ examples/pom.xml | 4 ++-- okhttp/build.gradle | 7 +++++++ 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 7129629598f..a646d8eb2d1 100644 --- a/build.gradle +++ b/build.gradle @@ -55,8 +55,8 @@ subprojects { group = "io.grpc" version = "1.15.0-SNAPSHOT" // CURRENT_GRPC_VERSION - sourceCompatibility = 1.6 - targetCompatibility = 1.6 + sourceCompatibility = 1.7 + targetCompatibility = 1.7 repositories { maven { // The google mirror is less flaky than mavenCentral() diff --git a/core/build.gradle b/core/build.gradle index 700592f86f3..e5670e4cdd0 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -1,5 +1,11 @@ description = 'gRPC: Core' +// Workaround: +// [Undefined reference (android-api-level-14-4.0_r4)] io.grpc.internal.(Rescheduler.java:87) +// >> Object java.util.Objects.requireNonNull(Object) +sourceCompatibility = 1.6 +targetCompatibility = 1.6 + dependencies { compile project(':grpc-context'), libraries.gson, diff --git a/examples/pom.xml b/examples/pom.xml index 93911e79a93..9ccf296e225 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -16,8 +16,8 @@ 3.5.1-1 2.0.7.Final - 1.6 - 1.6 + 1.7 + 1.7 diff --git a/okhttp/build.gradle b/okhttp/build.gradle index fa255d6e062..1e411352591 100644 --- a/okhttp/build.gradle +++ b/okhttp/build.gradle @@ -1,4 +1,11 @@ description = "gRPC: OkHttp" + +// Workaround: +// Util.java:219: warning: [unchecked] Possible heap pollution from parameterized vararg type T +// Need to verify the @SafeVarargs annotation is safe for Android +sourceCompatibility = 1.6 +targetCompatibility = 1.6 + dependencies { compile project(':grpc-core'), libraries.okhttp,