diff --git a/android/guava/pom.xml b/android/guava/pom.xml
index 2997108a20e2..ed15b827e213 100644
--- a/android/guava/pom.xml
+++ b/android/guava/pom.xml
@@ -90,42 +90,6 @@
maven-compiler-plugin
-
-
-
- default-compile
- compile
-
- compile
-
-
-
- **/Java8Usage.java
-
-
-
- 8
-
-
-
- main-compile
- compile
-
- compile
-
-
-
- **/Java8Usage.java
-
-
-
- maven-source-plugin
diff --git a/android/guava/src/com/google/common/base/Java8Usage.java b/android/guava/src/com/google/common/base/Java8Usage.java
deleted file mode 100755
index 78130cf676d9..000000000000
--- a/android/guava/src/com/google/common/base/Java8Usage.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2020 The Guava Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.common.base;
-
-import com.google.errorprone.annotations.CanIgnoreReturnValue;
-
-/**
- * A class that uses a couple Java 8 features but doesn't really do anything. This lets us attempt
- * to load it and log a warning if that fails, giving users advance notice of our dropping Java 8
- * support.
- */
-/*
- * This class should be annotated @GwtCompatible. But if we annotate it @GwtCompatible, then we need
- * to build GwtCompatible.java (-source 7 -target 7 in the Android flavor) before we build
- * Java8Usage.java (-source 8 target 8, which we already need to build before the rest of
- * common.base). We could configure Maven to do that, but it's easier to just skip the annotation.
- */
-final class Java8Usage {
- @java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_USE)
- @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
- private @interface SomeTypeAnnotation {}
-
- @CanIgnoreReturnValue
- static @SomeTypeAnnotation String performCheck() {
- Runnable r = () -> {};
- r.run();
- return "";
- }
-
- private Java8Usage() {}
-}
diff --git a/android/guava/src/com/google/common/base/Preconditions.java b/android/guava/src/com/google/common/base/Preconditions.java
index 38f665463f7a..995d3945e59b 100644
--- a/android/guava/src/com/google/common/base/Preconditions.java
+++ b/android/guava/src/com/google/common/base/Preconditions.java
@@ -15,11 +15,9 @@
package com.google.common.base;
import static com.google.common.base.Strings.lenientFormat;
-import static java.util.logging.Level.WARNING;
import com.google.common.annotations.GwtCompatible;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
-import java.util.logging.Logger;
import org.checkerframework.checker.nullness.compatqual.NonNullDecl;
import org.checkerframework.checker.nullness.compatqual.NullableDecl;
@@ -1490,21 +1488,4 @@ private static String badPositionIndexes(int start, int end, int size) {
// end < start
return lenientFormat("end index (%s) must not be less than start index (%s)", end, start);
}
-
- static {
- try {
- Java8Usage.performCheck();
- } catch (Throwable underlying) {
- Exception toLog =
- new Exception(
- "Guava will drop support for Java 7 in 2021. Please let us know if this will cause"
- + " you problems: https://github.com/google/guava/issues/5269",
- underlying);
- Logger.getLogger(Preconditions.class.getName())
- .log(
- WARNING,
- "Java 7 compatibility warning: See https://github.com/google/guava/issues/5269",
- toLog);
- }
- }
}
diff --git a/android/pom.xml b/android/pom.xml
index 96d2bd7a6f0a..c802ca337186 100644
--- a/android/pom.xml
+++ b/android/pom.xml
@@ -132,8 +132,8 @@
maven-compiler-plugin3.8.1
-
- 1.7
+
+ 1.8
- default-compile
- compile
-
- compile
-
-
-
- **/Java8Usage.java
-
-
-
- 8
-
-
-
- main-compile
- compile
-
- compile
-
-
-
- **/Java8Usage.java
-
-
-
-
maven-source-plugin
diff --git a/guava/src/com/google/common/base/Java8Usage.java b/guava/src/com/google/common/base/Java8Usage.java
deleted file mode 100644
index 78130cf676d9..000000000000
--- a/guava/src/com/google/common/base/Java8Usage.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2020 The Guava Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.common.base;
-
-import com.google.errorprone.annotations.CanIgnoreReturnValue;
-
-/**
- * A class that uses a couple Java 8 features but doesn't really do anything. This lets us attempt
- * to load it and log a warning if that fails, giving users advance notice of our dropping Java 8
- * support.
- */
-/*
- * This class should be annotated @GwtCompatible. But if we annotate it @GwtCompatible, then we need
- * to build GwtCompatible.java (-source 7 -target 7 in the Android flavor) before we build
- * Java8Usage.java (-source 8 target 8, which we already need to build before the rest of
- * common.base). We could configure Maven to do that, but it's easier to just skip the annotation.
- */
-final class Java8Usage {
- @java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_USE)
- @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
- private @interface SomeTypeAnnotation {}
-
- @CanIgnoreReturnValue
- static @SomeTypeAnnotation String performCheck() {
- Runnable r = () -> {};
- r.run();
- return "";
- }
-
- private Java8Usage() {}
-}
diff --git a/guava/src/com/google/common/base/Preconditions.java b/guava/src/com/google/common/base/Preconditions.java
index 3dd679ddeacf..30cc374d21d2 100644
--- a/guava/src/com/google/common/base/Preconditions.java
+++ b/guava/src/com/google/common/base/Preconditions.java
@@ -15,11 +15,9 @@
package com.google.common.base;
import static com.google.common.base.Strings.lenientFormat;
-import static java.util.logging.Level.WARNING;
import com.google.common.annotations.GwtCompatible;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
-import java.util.logging.Logger;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
@@ -1433,21 +1431,4 @@ private static String badPositionIndexes(int start, int end, int size) {
// end < start
return lenientFormat("end index (%s) must not be less than start index (%s)", end, start);
}
-
- static {
- try {
- Java8Usage.performCheck();
- } catch (Throwable underlying) {
- Exception toLog =
- new Exception(
- "Guava will drop support for Java 7 in 2021. Please let us know if this will cause"
- + " you problems: https://github.com/google/guava/issues/5269",
- underlying);
- Logger.getLogger(Preconditions.class.getName())
- .log(
- WARNING,
- "Java 7 compatibility warning: See https://github.com/google/guava/issues/5269",
- toLog);
- }
- }
}