Pin Java bindings to 1.7
The android_library bazel rule currently enforces Java 7
6c1106b1a7/src/main/java/com/google/devtools/build/lib/bazel/rules/android/BazelAndroidSemantics.java (L73)
More generally, to enable broader use we pin the source and artifacts
to 1.7 till Java 8 gains wider adoption across Android.
This commit is contained in:
parent
4c0052dc4b
commit
c9efdaf468
@ -1,5 +1,14 @@
|
|||||||
# -*- Python -*-
|
# -*- Python -*-
|
||||||
|
|
||||||
|
# Pin to Java 1.7 to ensure broader compatibility for the Java bindings on
|
||||||
|
# Android. Note also that the android_library bazel rule currently enforces
|
||||||
|
# java 7
|
||||||
|
# https://github.com/bazelbuild/bazel/blob/6c1106b1a721516d3b3db54d2e1c31b44a76fbb1/src/main/java/com/google/devtools/build/lib/bazel/rules/android/BazelAndroidSemantics.java#L73
|
||||||
|
|
||||||
|
JAVA_VERSION_OPTS = [
|
||||||
|
"-source 7 -target 7",
|
||||||
|
]
|
||||||
|
|
||||||
# A more robust set of lint and errorprone checks when building
|
# A more robust set of lint and errorprone checks when building
|
||||||
# Java source to improve code consistency.
|
# Java source to improve code consistency.
|
||||||
|
|
||||||
@ -151,4 +160,4 @@ EP_DISABLED_CHECKS = [
|
|||||||
|
|
||||||
EP_OPTS = EP_ENABLED_WARNINGS + EP_DISABLED_CHECKS
|
EP_OPTS = EP_ENABLED_WARNINGS + EP_DISABLED_CHECKS
|
||||||
|
|
||||||
JAVACOPTS = XLINT_OPTS + EP_OPTS
|
JAVACOPTS = JAVA_VERSION_OPTS + XLINT_OPTS + EP_OPTS
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.6.1</version>
|
<version>3.6.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.8</source>
|
<source>1.7</source>
|
||||||
<target>1.8</target>
|
<target>1.7</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
@ -27,8 +27,8 @@
|
|||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.6.1</version>
|
<version>3.6.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.8</source>
|
<source>1.7</source>
|
||||||
<target>1.8</target>
|
<target>1.7</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
Loading…
Reference in New Issue
Block a user