Why does creating a release build include jdk 11 source?

Viewed 100

I am using Android Studio 4.2.2, and just recently a release .aab build I created for publishing to Google Open Beta jumped in size by ~7MB. I had not added any new assets, so I looked at it with the "Analyze APK" option, and I noticed for the first time a 'jdk11' folder is in there. It turns out it is the source files for the jdk.

Why is the jdk source being included in my release build? I am not aware of any configuration or manifest changes I have made that would spur this - but maybe I just don't know where to look?

1 Answers

It appears that the culprit is a dependency update in my build.gradle for my app module for espresso-contrib from 3.3.0 to 3.4.0. I had done a number of updates in the test area of this gradle config file, and it is quite clear that if I stick with espresso contrib 3.3.0 my aab size is 7MB less than if I move to 3.4.0. Not sure what kind of dependency would cause that jdk sources to come in, but it is clear this happens.

aab contents using espresso-contrib 3.4.0: enter image description here

aab contents using espresso-contrib 3.3.0: enter image description here

I added an issue for this here.

Related