MINOR: Pass `-release 8` to scalac and upgrade to Gradle 6.4 (#8538)

The version of Zinc included with Gradle 6.4 includes a fix for the blocker
that was preventing us from passing `-release 8` to scalac.

Release notes for Gradle 6.4:

https://docs.gradle.org/6.4/release-notes.html

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
This commit is contained in:
Ismael Juma 2020-05-05 22:20:29 -07:00 committed by GitHub
parent 3b6bf80530
commit 1d438033f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 3 deletions

View File

@ -4,7 +4,9 @@ See our [web site](https://kafka.apache.org) for details on the project.
You need to have [Java](http://www.oracle.com/technetwork/java/javase/downloads/index.html) installed.
Java 8 should be used for building in order to support both Java 8 and Java 11 at runtime.
We build and test Apache Kafka with Java 8, 11 and 14. We set the `release` parameter in javac and scalac
to `8` to ensure the generated binaries are compatible with Java 8 or higher (independently of the Java version
used for compilation).
Scala 2.13 is used by default, see below for how to use a different Scala version or all of the supported Scala versions.

View File

@ -501,6 +501,10 @@ subprojects {
]
}
// Scalac's `-release` requires Java 9 or higher
if (JavaVersion.current().isJava9Compatible())
scalaCompileOptions.additionalParameters += ["-release", minJavaVersion]
configure(scalaCompileOptions.forkOptions) {
memoryMaximumSize = '1g'
jvmArgs = ['-Xss4m']

View File

@ -61,7 +61,7 @@ versions += [
bcpkix: "1.64",
checkstyle: "8.20",
commonsCli: "1.4",
gradle: "6.3",
gradle: "6.4",
gradleVersionsPlugin: "0.28.0",
grgit: "4.0.1",
httpclient: "4.5.11",

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists