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.
If the plugin is < 7, Java 8 is used. If it is >= 7, then Java 11 is used.
If a specific version of Java is needed, it is possible to override the automatic detection using
OVERRIDE_JAVA_VERSION environment variable.
The environment variable
OVERRIDE_JAVA_VERSION can only be set
to an integer representing the major version:
11 are currently allowed.
1.8.0 is a valid version, it is not a valid input.
OVERRIDE_JAVA_VERSION is set to an invalid or unavailable version the build will fail.