a759cc912f
This does almost everything until the final build and fails there because we are using too modern software with a too old project, I think. Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
17 lines
614 B
Nix
17 lines
614 B
Nix
{ lib
|
|
, writeShellScriptBin
|
|
, gradle
|
|
, jq
|
|
, yq-go
|
|
}:
|
|
|
|
writeShellScriptBin "update-locks" ''
|
|
set -eu -o pipefail
|
|
set -x
|
|
${gradle}/bin/gradle dependencies --write-locks
|
|
${gradle}/bin/gradle --write-verification-metadata sha256 dependencies
|
|
${yq-go}/bin/yq -p=xml -o=json gradle/verification-metadata.xml \
|
|
| ${jq}/bin/jq '."verification-metadata".components.component' \
|
|
| ${jq}/bin/jq '[ .[] | { group: ."+@group", name: ."+@name", version: ."+@version", artifacts: [([.artifact] | flatten | .[] | {(."+@name"): .sha256."+@value"})] | add } ]' > deps.json
|
|
rm gradle/verification-metadata.xml
|
|
''
|