Refactoring the derivation that fetches all the POMs, JARs,
and AARs in order to make it more generic and easier to extend.
The main change is adding `files` key in `deps.json` which contains
a dict of all the files reletad to given package.
This way we can more easily include other files that might be available
for download, like AARs with ASC suffix, or `nodeps` JARs.
This is also necessary for the React Native upgrade:
https://github.com/status-im/status-mobile/pull/15203
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This handles the usual case where a missing Gradle version causes the
call to `make nix-update-gradle` to fail since call to Gradle also fails.
This is simpler than getting a dev to run commands manually.
Signed-off-by: Jakub Sokołowski <jakub@status.im>
Otherwise on some devices with with good connecitons rate limiting might
cause failures to fetch POMs or JARs and in result failing the whole update.
Signed-off-by: Jakub Sokołowski <jakub@status.im>
Also adjusted the `generate.sh` script and split stuff into separate function
to make it easier to run specific stages of the generation process.
Signed-off-by: Jakub Sokołowski <jakub@status.im>
Before errors like this:
```
finder.go:91: error: 'no pom data' for: <Dep ID=com.afollestad.material-dialogs:commons:0.9.6.0 O=false S= >
```
Would be printed to `stderr` but exit code would not be non-zero.
Now the whole `make nix-update-gradle` target should fail if any
dependency resolution fails.
Signed-off-by: Jakub Sokołowski <jakub@status.im>
The mess with regexes is hard to read and think about which is why it
had bugs with handling some Gradle formats.
It also lowers further the number of dependencies pulled from 785 to 744.
Changes:
- Added `gradle_parser.awk` script for getting dependencies from Gradle
- Changed the `deps.urls` file to contain full URLs to POMs
- Dropped the `deps.urls.old` part since `get_urls.sh` no longer exists
- Added `CLR` for learing line to `scripts/colors.sh`
- Wrote a new `nix/deps/gradle/README.md`
- Re-generated `nix/pkgs/go-maven-resolver/deps.nix`
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This Go package was implemented by me to avoid having to use Mavan or
Gradle to resolve all the dependencies for Nix:
https://github.com/status-im/go-maven-resolver
The Go tool is essentially a slightly smarter and more efficient version
of the `get_urls.sh` script, which was mostly slow due to the `mvn
dependency:list` calls and slow HTTP requests.
This takes down the `make nix-update-gradle` target to under 2 minutes
on my machine.
Signed-off-by: Jakub Sokołowski <jakub@status.im>
changes:
- Moved Gradle deps setup to `nix/deps/gradle`
- Dropped `nix/mobile/android/maven-and-npm-deps/maven`
- Used GNU Parallel to optimize `nix/deps/gradle/generate.sh`
- Move Maven+Node shell setup from `release-android.nix` to Android shell
- Moved AAPT2 patching to `nix/pkgs/aapt2`
- Drop `patchPhase` and `gradlew` use from `release-android.nix`
- Simplify symlinking `{mobile,desktop}/js_files/*`
- Add new `nodejs` shell and merge it with `clojure` and `gradle`
- Re-created Gradle deps files with new scripts:
- `nix/deps/gradle/proj.list`
- `nix/deps/gradle/deps.list`
- `nix/deps/gradle/deps.urls`
- `nix/deps/gradle/deps.nix`
Signed-off-by: Jakub Sokołowski <jakub@status.im>