Clone this repo:


  1. c65e939 [dirmd] Deduplicate directory metadata by Nodir Turakulov · 16 hours ago main master
  2. 325fc7e Android: Disable emoji2 on startup init code by Mohamed Heikal · 32 hours ago
  3. 2000d0a [Build] Remove broken cipd upload instructions from script by Peter Kotwicz · 3 weeks ago
  4. a81066b Reland: [Build] Add kotlinx-coroutines-core dependency part 3/3 by Peter Kotwicz · 3 weeks ago
  5. 57636f9 Clarify android_deps/ README by Peter Kotwicz · 3 weeks ago

Android Deps Repository Generator

Tool to generate a gradle-specified repository for Android and Java dependencies.

Usage [--help]

This script creates a temporary build directory, where it will, for each of the dependencies specified in build.gradle, take care of the following:

  • Download the library
  • Generate a README.chromium file
  • Download the LICENSE
  • Generate a GN target in
  • Generate .info files for AAR libraries
  • Generate 3pp subdirectories describing the CIPD packages
  • Generate a deps entry in DEPS.

It will then compare the build directory with your current workspace, and print the differences (i.e. new/updated/deleted packages names).

Adding a new library or updating existing libraries.

Full steps to add a new third party library or update existing libraries:

  1. Update build.gradle with the new dependency or the new versions.

  2. Run to update your current workspace with the changes. This will update, among other things, your top-level DEPS file.

  3. git add all the 3pp related changes and create a CL for review. Keep the 3pp/ and .gradle changes in the CL and revert the other files. The other files will be committed in a follow up CL.

  4. Land the first CL in step 3 and wait for the corresponding 3pp packager to create the new CIPD packages. The 3pp packager runs every 6 hours. You can see the latest runs here. See //docs/ for how it works.

  5. If your follow up cl takes more than a day please revert the original cl. The bot runs 4 times a day and once it uploads to cipd there is no need to keep the modified 3pp files. When you are ready to land the follow up cl, you can land everything together since the cipd packages have already been uploaded.

  6. Run again. There should not be any 3pp related changes. Create a commit.

    If the CL is doing more than upgrading existing packages or adding packages from the same source and license (e.g. gms) follow //docs/ for the review.

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.

Implementation notes:

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.