bundletool icon indicating copy to clipboard operation
bundletool copied to clipboard

Installation Instructions

Open amunrarara opened this issue 3 years ago • 5 comments

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.

amunrarara avatar Apr 30 '21 07:04 amunrarara

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> ...

jcstange avatar Apr 30 '21 09:04 jcstange

In the meantime Mac users can install with brew - https://formulae.brew.sh/formula/bundletool

Kamony avatar May 31 '21 11:05 Kamony

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.

TonyHoyleRps avatar Oct 12 '21 11:10 TonyHoyleRps

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

hrishikesh-kadam avatar Jun 02 '23 19:06 hrishikesh-kadam

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).

eseidel avatar Sep 06 '23 18:09 eseidel