bundletool
bundletool copied to clipboard
Installation Instructions
Can we get a simple one-liner in README.md that explains installation? I had to make a trip to Stack Overflow to get those instructions. I see I can either clone the repo then set up an alias, or run a brew command. Neither are mentioned in the README.
I was wandering here to find out how to install it 👍🏽 Apparently for Linux you have to download the jar from: https://github.com/google/bundletool/releases
and then run java -jar <PATH_TO_JAR> ...
In the meantime Mac users can install with brew - https://formulae.brew.sh/formula/bundletool
Seconded on a README. All the instructions on the android side assume a compiled binary you can call using 'bundletool' but the download is 'bundletool.jar' and it's not clear how you go from one to the other. I ended up lashing together a shell script which is messy.
Hope this script helps someone. I will keep updating this script here - https://gist.github.com/hrishikesh-kadam/4623770aa644fac3caf3a927fbcd1c80
#!/usr/bin/env bash
set -e -o pipefail
if [[ $GITHUB_ACTIONS == "true" ]]; then
# To avoid GitHub API rate limiting
VERSION=$( \
curl --silent --show-error --location --fail \
--output /dev/null \
--write-out "%{url_effective}" \
https://github.com/google/bundletool/releases/latest \
| xargs basename
)
else
VERSION=$( \
curl --silent --show-error --location --fail \
"https://api.github.com/repos/google/bundletool/releases/latest" \
| jq -r .name
)
fi
BUNDLETOOL_PATH="$ANDROID_HOME/bundletool-all.jar"
curl --silent --show-error --location --fail \
--output "$BUNDLETOOL_PATH" \
"https://github.com/google/bundletool/releases/download/$VERSION/bundletool-all-$VERSION.jar"
printf "bundletool "
java -jar "$BUNDLETOOL_PATH" version
Would also welcome mention of whatever the minimum java version for Bundletool is. :) We get complaints from users from time to time that bundletool fails for them (probably due to their java version being too old).