Simply calling `generate.sh` should result in a `deps.json` file which is used in the derivation that provides Gradle dependencies when building the Android app.
You can see in [`nix/mobile/android/release.nix`](../../mobile/android/release.nix) that it's used via the `-Dmaven.repo.local='${deps.gradle}'` Gradle flag.
# Files
First we have the files that store data on Gradle dependencies:
*`proj.list` - List of projects of which our Gradle project consists.
*`deps.list` - List of dependencies for our project and sub-projects.
*`deps.urls` - List of URLs to POMs for all of the dependencies.
*`deps.json` - Final file containing all of the necessary data for Nix.
Generating scripts:
-`generate.sh` - Main script which generates all the above files.
-`get_projects.sh` - Calls Gradle to get a list of sub-projects.
-`get_deps.sh` - Calls Gradle to get all the dependencies of sub-projects.
-`gradle_parser.awk` - An AWK script that parses above Gradle output.
-`url2json.sh` - Converts the list of URLs into a format consumable by Nix.
One dependency these scripts require is the [go-maven-resolver](https://github.com/status-im/go-maven-resolver) which turns a list of packages into list of all URLs of POMs for them and their dependencies.
One edge case that is currently not automatically handled by this setup is an addition of a new dependency that requires a version of Gradle we don't have. In that case running `make nix-update-gradle` would fail with:
This happens because `get_projects.sh` and `get_deps.sh` depend on running Gradle to generate their output, and that will not work because Gradle cannot find the matching JAR for the new dependency.