-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[Bug]: Used too much storage to store build intermediates #1161
Comments
If feel like this is not normal 🤯 Details of a test apk...
|
Found this issue 🕵️ preparing the fix with a report… |
Yes, I did it intentionally. I need to check if there are any compilation issues in the code. Sometimes I modify the ViewModel but Android Studio won't notify me if there are errors that exist in the ViewModelTests. So I have to compile everything to avoid failures in CI. |
And cleanup unnecessary transitive dependencies. Fixes android#1161
The main issue comes from robolectric being added to the runtime classpath of instrumented tests because it is transitively exported by
Here are some stats/results with different solutions:
|
@lihenggui the main issue has been fixed during this PR: I prepared a followup PR to clean things up a bit more in: You can close the issue 👍 |
Great, thank you! |
A question here, the dependency resolution behavior is reverted in the AGP 8.3.1 version.
Does that mean this issue will appear in the latest version again? |
This was not the fix. The fix was mostly removing robolectric-shadow from the |
My PR #1163 was also fixing the issue, before the AGP update. |
Is there an existing issue for this?
Is there a StackOverflow question about this issue?
What happened?
Usually, I will run this command to check there is no compile error in the project.
./gradlew --init-script gradle/init.gradle.kts --no-configuration-cache --no-daemon clean spotlessApply assembleRelease testClasses assembleAndroidTest --warning-mode all
I noticed that after finishing compiling, the size of the project folder grows rapidly, it will use about 15GB of disk space to store build intermediates.
Each feature module took around 1.3G of disk space:
In the
core
folder, the size ofdesignsystem
,ui
, anddatabase
modules are abnormal, for other modules, the size is ok.I am curious if it is expected to use so much storage to save build intermediates for a single module. The size can be easily 'exploded' by adding more modules to the project.
GitHub-hosted free tier runners provide 14G of storage to run actions, the storage limit of the runners is almost the same as the size of the project. If we add one more module, the action will fail and throw a
No space left
error, causing the CI to fail all the time.Relevant logcat output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: