How do I install bundletool?

Although the docs mentioned

If you haven't already done so, download bundletool from the GitHub repository.

However, the repo contains only a jar file. How do I install it so that I can run with the 'bundletool' command just like the docs' example?


Solution 1:

If you have brew installed simply run brew install bundletool and the alias will be set up for you as well. It did the trick for me.

Solution 2:

You can create an alias (or doskey on Windows), e.g.

alias bundletool='java -jar bundletool-all.jar'

Solution 3:

Another alternative is access Bundletool release page and download the bundletool-all-[LAST-VERSION].jar file into some directory.

After that you could run it on the directory calling:

java -jar bundletool-all-0.10.2.jar your_arguments_here

If you want, rename the jar file to bundletool.jar, then run it calling:

java -jar bundletool.jar your_arguments_here

If you don't want call java every time, you can create an alias for that, and after that run quicly:

alias bundletool='java -jar bundletool-all.jar'

bundletool your_arguments_here