[Dependency Cache] Use Custom Init Gradle Task to Download Dependencies #13391
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Project Thread: paaHJt-7CE-p2
Test PR: #13387
Depends On: buildkite-ci#585
Description
This PR uses the custom
init.gradle.kts
related file, defined within the Android AMI itself (see buildkite-ci#585), which now contains this customdownloadDependencies
task.With this change, instead of individually calling a number of
assemble/lint
related tasks to download as many dependencies as possible prior to saving the cache, any project can now utilize this globally defineddownloadDependencies
task to replace all this boilerplate and streamline the overall dependency cache process.Notably, with this change, the dependency cache process:
assemble/lint
tasks, just that singledownloadDependencies
task, making the build process faster (for scheduled builds).Testing information
Just verify the below:
dependency cache
job to complete: 5m 20sNote
The only drawback to this change, but an expected one, is that the size of the dependency cache is considerably bigger than before,
784.61 MB
now,625.74 MB
before, which is more than150 MB
a diff, and this makes the cache restoration a few seconds slower (12s
before,15s
now, ish). Having said that, we believe that the low cost of maintaining the cache saving process is worth the extra seconds (context).Merge Instructions
status: do not merge
label.ami-0953ca1d949c23a58
->ami-0f976e0b4de96aa28
#13387 and a8c-ci-toolkit-buildkite-plugin#142test-only PRs.
RELEASE-NOTES.txt
if necessary. Use the "[Internal]" label for non-user-facing changes.Reviewer (or Author, in the case of optional code reviews):
Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement: