nixpkgs-fmt
This commit is contained in:
parent
c989806a11
commit
760d4ea1b5
1 changed files with 17 additions and 17 deletions
|
@ -47,29 +47,29 @@ let
|
||||||
''';
|
''';
|
||||||
runScript = "''${run}";
|
runScript = "''${run}";
|
||||||
}).env
|
}).env
|
||||||
'';
|
'';
|
||||||
|
|
||||||
gradle-run-script = pkgs.writeScriptBin "gradle" ''
|
gradle-run-script = pkgs.writeScriptBin "gradle" ''
|
||||||
#!${pkgs.bash}/bin/bash
|
#!${pkgs.bash}/bin/bash
|
||||||
|
|
||||||
REPO_ROOT="$(git rev-parse --show-toplevel)"
|
REPO_ROOT="$(git rev-parse --show-toplevel)"
|
||||||
nix-shell --argstr run "$REPO_ROOT/gradlew $@" "${gradle-fhs-nix}"
|
nix-shell --argstr run "$REPO_ROOT/gradlew $@" "${gradle-fhs-nix}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
sign-release = pkgs.writeScriptBin "sign-release" ''
|
sign-release = pkgs.writeScriptBin "sign-release" ''
|
||||||
#!${pkgs.bash}/bin/bash
|
#!${pkgs.bash}/bin/bash
|
||||||
|
|
||||||
BUILD_TOOLS_PATH="${composed.androidsdk}/libexec/android-sdk/build-tools/28.0.3"
|
BUILD_TOOLS_PATH="${composed.androidsdk}/libexec/android-sdk/build-tools/28.0.3"
|
||||||
REPO_ROOT="$(git rev-parse --show-toplevel)"
|
REPO_ROOT="$(git rev-parse --show-toplevel)"
|
||||||
APK_DIR="$REPO_ROOT/app/build/outputs/apk/release"
|
APK_DIR="$REPO_ROOT/app/build/outputs/apk/release"
|
||||||
|
|
||||||
rm "$APK_DIR/"*
|
rm "$APK_DIR/"*
|
||||||
${gradle-run-script}/bin/gradle assembleRelease
|
${gradle-run-script}/bin/gradle assembleRelease
|
||||||
"$BUILD_TOOLS_PATH/zipalign" -v -p 4 "$APK_DIR/app-release-unsigned.apk" "$APK_DIR/app-release-unsigned-aligned.apk"
|
"$BUILD_TOOLS_PATH/zipalign" -v -p 4 "$APK_DIR/app-release-unsigned.apk" "$APK_DIR/app-release-unsigned-aligned.apk"
|
||||||
|
|
||||||
"$BUILD_TOOLS_PATH/apksigner" sign --ks "$REPO_ROOT/keystore.jks" --out "$APK_DIR/app-release.apk" "$APK_DIR/app-release-unsigned-aligned.apk"
|
"$BUILD_TOOLS_PATH/apksigner" sign --ks "$REPO_ROOT/keystore.jks" --out "$APK_DIR/app-release.apk" "$APK_DIR/app-release-unsigned-aligned.apk"
|
||||||
"$BUILD_TOOLS_PATH/apksigner" verify "$APK_DIR/app-release.apk"
|
"$BUILD_TOOLS_PATH/apksigner" verify "$APK_DIR/app-release.apk"
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
pkgs.mkShell {
|
pkgs.mkShell {
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue