mirror of
https://github.com/status-im/status-react.git
synced 2025-01-12 20:14:40 +00:00
Jakub Sokołowski
20a0cc01f6
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>
23 lines
766 B
Bash
Executable File
23 lines
766 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# This script generates a list of Gradle sub-projects by parsing the output
|
|
# of Gradle 'projects' task using grep and sed. It is necessary in order to
|
|
# collect list of dependencies for main project and its sub-projects.
|
|
|
|
set -Eeuo pipefail
|
|
|
|
GIT_ROOT=$(cd "${BASH_SOURCE%/*}" && git rev-parse --show-toplevel)
|
|
# Gradle needs to be run in 'android' subfolder.
|
|
cd "${GIT_ROOT}/android"
|
|
|
|
# Show Gradle log in case of failure.
|
|
GRADLE_LOG_FILE='/tmp/gradle.log'
|
|
function show_gradle_log() { cat "${GRADLE_LOG_FILE}" >&2; }
|
|
trap show_gradle_log ERR
|
|
|
|
# Print all our sub-projects
|
|
./gradlew projects --no-daemon --console plain 2>&1 \
|
|
| tee "${GRADLE_LOG_FILE}" \
|
|
| grep "Project ':" \
|
|
| sed -E "s;^.--- Project '\:([@_a-zA-Z0-9\-]+)';\1;"
|