Skip to content

Instantly share code, notes, and snippets.

@esafirm

esafirm/jetify.sh

Last active Sep 23, 2020
Embed
What would you like to do?
Download AAR and jetify it. Unix only!
#!/usr/bin/env bash
TARGET=temp_target
AAR_URL=$1
TARGET_NAME=$2
ZIP_NAME=jetifier.zip
# Download Jetifier
curl "https://dl.google.com/dl/android/studio/jetifier-zips/1.0.0-beta09/jetifier-standalone.zip" -o $ZIP_NAME
unzip $ZIP_NAME
rm -rf $ZIP_NAME
## Download the AAR
curl $AAR_URL -o $TARGET_NAME
## Jetify
FINAL_NAME="jetified-$TARGET_NAME"
./jetifier-standalone/bin/jetifier-standalone -i $TARGET_NAME -o $FINAL_NAME
## Cleanup
rm -rf jetifier-standalone
rm -rf $TARGET_NAME
echo "Your AAR is ready: $FINAL_NAME"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.