mirror of https://github.com/apache/kafka.git
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:
parent
3b6bf80530
commit
1d438033f7
|
@ -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.
|
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.
|
Scala 2.13 is used by default, see below for how to use a different Scala version or all of the supported Scala versions.
|
||||||
|
|
||||||
|
|
|
@ -501,6 +501,10 @@ subprojects {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Scalac's `-release` requires Java 9 or higher
|
||||||
|
if (JavaVersion.current().isJava9Compatible())
|
||||||
|
scalaCompileOptions.additionalParameters += ["-release", minJavaVersion]
|
||||||
|
|
||||||
configure(scalaCompileOptions.forkOptions) {
|
configure(scalaCompileOptions.forkOptions) {
|
||||||
memoryMaximumSize = '1g'
|
memoryMaximumSize = '1g'
|
||||||
jvmArgs = ['-Xss4m']
|
jvmArgs = ['-Xss4m']
|
||||||
|
|
|
@ -61,7 +61,7 @@ versions += [
|
||||||
bcpkix: "1.64",
|
bcpkix: "1.64",
|
||||||
checkstyle: "8.20",
|
checkstyle: "8.20",
|
||||||
commonsCli: "1.4",
|
commonsCli: "1.4",
|
||||||
gradle: "6.3",
|
gradle: "6.4",
|
||||||
gradleVersionsPlugin: "0.28.0",
|
gradleVersionsPlugin: "0.28.0",
|
||||||
grgit: "4.0.1",
|
grgit: "4.0.1",
|
||||||
httpclient: "4.5.11",
|
httpclient: "4.5.11",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
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
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|
Loading…
Reference in New Issue