Override Java version on Android builds
Starting with the build stack Linux 2021.09
Appflow tries to detect which version of the Android Gradle Plugin is used in the project. Here is how the Gradle Plugin version maps to the Java version used:
Gradle Plugin Version | Java Version |
---|---|
<= 6 | 8 |
7 | 11 |
>= 8 | 17 |
If a specific version of Java is needed, it is possible to override the automatic detection using OVERRIDE_JAVA_VERSION
environment variable.
Notes
The environment variable OVERRIDE_JAVA_VERSION
can only be set to an integer representing the major version, such as 17
. Even if 17.0.6
is a valid version, it is not a valid input.
If OVERRIDE_JAVA_VERSION
is set to an invalid or unavailable version the build will fail.
note
Always refer to the Build Stacks page for the most up to date values.