Chromium's way to pull prebuilt .jar / .aar files from Maven.
There are 2 roots for libraries:
//third_party/androidx
//third_party/androidx/build.gradle.template//third_party/android_deps
//third_party/android_deps/build.gradle.templateThis system supports deps between roots, but since they roll separately, such deps can require manually rolling multiple roots atomically, and sometimes explicitly adding dependent libraries to build.gradle{.template} files.
See first: //docs/adding_to_third_party.md.
For AndroidX libries, see //third_party/androidx/README.md
//third_party/android_deps/build.gradle.templatethird_party/android_deps/fetch_all.py --local
build.gradle.templateE.g. missing license, HTML in license, missing URL or description:
PROPERTY_OVERRIDES//third_party/androidx/customizations.gniaddSpecialTreatment(), or for hand-written targets, edit //third_party/android_deps/overrides.gni (BUILD.gn is overwritten by the roller)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. This is especially true nowadays that pom.xml files for many dependencies are no longer maintained by the package authors.
The groovy code in //third_party/android_deps/buildSrc/src/main/groovy is best edited using Android Studio (ASwB works too). This code can be auto-formatted by using Android Studio's code formatting actions.
The easiest way to find these actions is using Ctrl+Shift+A and then typing the name of the action to be performed (e.g. reformat). Another easy way is setting up Settings>Tools>Actions on Save>Reformat code and ..>Optimize imports.
The current code is formatted using a specific code style, you can import //third_party/android_deps/Chromium_Groovy.xml via Settings>Editor>Code Style>[settings gear]>Import Scheme....