Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Gradle 7.x and AGP 7.x #53

Closed
neugartf opened this issue Feb 3, 2021 · 5 comments
Closed

Support for Gradle 7.x and AGP 7.x #53

neugartf opened this issue Feb 3, 2021 · 5 comments

Comments

@neugartf
Copy link
Contributor

neugartf commented Feb 3, 2021

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

@thyrlian
Copy link
Owner

thyrlian commented Feb 3, 2021

Sure. We can think about several solutions:

  • A sub-image for the legacy JDK
  • Multiple JDK support, config/choose via ARG

Thanks Fabian :)

@neugartf
Copy link
Contributor Author

neugartf commented Feb 8, 2021

I would suggest the ARG way and then publish two different images like they do here: https://github.com/alvr/alpine-android.

@thyrlian
Copy link
Owner

thyrlian commented Feb 8, 2021

Sounds good, so far no better alternative solution.

@thyrlian
Copy link
Owner

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.

@thyrlian
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants