diff options
author | Tomasz Kramkowski <tomasz@kramkow.ski> | 2023-04-21 23:50:38 +0100 |
---|---|---|
committer | Tomasz Kramkowski <tomasz@kramkow.ski> | 2023-04-21 23:50:38 +0100 |
commit | 16a36c812fabda812ecf3aaa7f12fa6f44c66b2e (patch) | |
tree | ccae60abf8301ae451cfa1f21c33b8a62d5306cf /default.apk.do | |
parent | db091bfd1db36ab66340ccad2eb7b6393a0aa3da (diff) | |
download | android-jetpack-compose-redo-master.tar.gz android-jetpack-compose-redo-master.tar.xz android-jetpack-compose-redo-master.zip |
Diffstat (limited to 'default.apk.do')
-rwxr-xr-x[-rw-r--r--] | default.apk.do | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/default.apk.do b/default.apk.do index e56df77..bf95e7e 100644..100755 --- a/default.apk.do +++ b/default.apk.do @@ -1,21 +1,20 @@ #!/usr/bin/env bash set -e - -redo-ifchange .vars.rc resources.rc -. ./.vars.rc -. ./resources.rc - src=${1%.apk}.dex - -android="$PLATFORM/android.jar" -manifest=AndroidManifest.xml - -redo-ifchange "$BUILD_TOOLS/aapt2" "$BUILD_TOOLS/zipalign" "${resources[@]}" "$src" "$manifest" "$android" - +redo-ifchange .vars.rc "$src" "R.zip" "R.dex" \ + "compile.packages.dex" "runtime.packages.dex" +. ./.vars.rc +redo-ifchange "$BUILD_TOOLS/zipalign" tmp=$(mktemp) trap 'rm -f "$tmp"' EXIT -"$BUILD_TOOLS/aapt2" link --manifest "$manifest" -o "$tmp" -I "$android" "${resources[@]}" -7z a -tzip "$tmp" "$src" -7z rn -tzip "$tmp" "$src" classes.dex +add() { + 7z a -tzip "$tmp" "$1" >/dev/null + 7z rn -tzip "$tmp" "$1" "classes$2.dex" >/dev/null +} +7z e -so "R.zip" "res.apk" >"$tmp" +add "$src" '' +add "R.dex" 2 +add "compile.packages.dex" 3 +add "runtime.packages.dex" 4 "$BUILD_TOOLS/zipalign" -f 4 "$tmp" "$3" # vim:ft=bash |