Created
November 4, 2015 12:56
-
-
Save maxme/43b43da9db0209498521 to your computer and use it in GitHub Desktop.
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
deps="$(find . -iname "build.gradle" | xargs grep 'compile ' | grep -v project | sed -E "s/.*'(.*)'.*/\1/" | sort | uniq)" | |
function printTemplate() { | |
cat << EOF | |
remote_file( | |
name = '$1-file', | |
out = '$2', | |
url = 'mvn:$4:$1:aar:$3', | |
sha1 = '0ec99fae8716984ec56489fb45d1ae752724bae7', | |
) | |
android_prebuilt_aar( | |
name = '$1', | |
aar = ':$1-file', | |
) | |
EOF | |
} | |
echo $depsr | |
for i in $deps ; do | |
name=$(echo $i | cut -d ":" -f2) | |
group=$(echo $i | cut -d ":" -f1) | |
version=$(echo $i | cut -d ":" -f3) | |
file="$name.aar" | |
printTemplate "$name" "$file" "$version" "$group" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment