Last active
September 23, 2020 03:11
-
-
Save esafirm/8f868a5c0fee220b9a97385da3ce208b to your computer and use it in GitHub Desktop.
Download AAR and jetify it. Unix only!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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