Update Compiling for Android JDK version specification #5312
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, the Compiling for Android documentation specifies JDK version 8; stating that JDK version 9 or later are not supported. However, this was based on Gradle version 2, which, indeed, did not support JDK version 9 or later. The current version of Gradle used is 6.7.1, which supports JDK 15[1].
JDK 11 is required to upgrade the Android Gradle plug-in to Gradle 7.0. The current OpenJDK and (previous) Oracle LTS JDK version is 11. Therefore, this PR updates the documentation to specify using JDK version 11.
BTW: Oracle has recently (September 2021) released a new LTS: JDK 17[2]) but both OpenJDK and Gradle need to catchup before we can specify this.
[1] https://docs.gradle.org/current/userguide/compatibility.html
[2] https://en.wikipedia.org/wiki/Java_version_history#Java_17