Closed neugartf closed 3 years ago
I would suggest the ARG way and then publish two different images like they do here: https://github.com/alvr/alpine-android.
Sounds good, so far no better alternative solution.
Done.
Now the default image is with JDK11, and the variant image android-sdk-jdk8
is with JDK8.
To pull the latest JDK11 image: docker pull thyrlian/android-sdk:7.0
.
Details can be found here.
README is updated as well:
Earlier in JDK 8, you need to set the environment variable _JAVA_OPTIONS to -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap. Then you'll see such logs like Picked up _JAVA_OPTIONS: -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap during any task execution, which means it takes effect. JDK 10 has introduced -XX:+UseContainerSupport which is enabled by default to improve the execution and configurability of Java running in Docker containers. Since JDK 1.8.0_191, -XX:+UseContainerSupport was also backported, then you don't need to set -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap any more. UseCGroupMemoryLimitForHeap was deprecated in JDK 10 and removed in JDK 11.
AGP 7.x and Gradle 7.x updates will need JDK 11, thus we might want to start preparing a branch that supports JDK 11.
https://android-developers.googleblog.com/2020/12/announcing-android-gradle-plugin.html