Tool to generate a gradle-specified repository for Android and Java dependencies.
This script creates a temporary build directory, where it will, for each of the dependencies specified in
build.gradle, take care of the following:
depsentry in DEPS.
It will then compare the build directory with your current workspace, and print the differences (i.e. new/updated/deleted packages names).
Full steps to add a new third party library:
Add dependency to
fetch_all.py to verify the new
build.gradle file and that all dependencies could be downloaded properly. This does not modify your workspace. If not, fix your
build.gradle file and try again.
fetch_all.py --update-all to update your current workspace with the changes. This will update, among other things, your top-level DEPS file, and print a series of commands to create new CIPD packages.
fetch_all.py --update-allalready check for uniqueness of the tag before uploading a new version. You can also supply a new suffix in your package using FALLBACK_PROPERTIES in third_party/android_deps/buildSrc/src/main/groovy/ChromiumDepGraph.goovy
Run the commands printed at step 3 to create new and updated packages via cipd.
Thoroughly test your change on a clean checkout.
rm -rf third_party/android_deps/libs/[!O]* && third_party/android_deps/fetch_all.py --update-all.
Create a commit & follow
//docs/adding_to_third_party.md for the review.
Note that if you're not satisfied with the results, you can use
fetch_all.py --reset-workspace to reset your workspace to its HEAD state, including the original CIPD symlinks under
third_party/android_deps/repository/. This commands preserves local
If you are updating any of the gms dependencies, please ensure that the license file that they use, explained in the README.chromium is up-to-date with the one on android's website, last updated date is at the bottom.
The script invokes a Gradle plugin to leverage its dependency resolution features. An alternative way to implement it is to mix gradle to purely fetch dependencies and their pom.xml files, and use Python to process and generate the files. This approach was not as successful, as some information about the dependencies does not seem to be available purely from the POM file, which resulted in expecting dependencies that gradle considered unnecessary.