Last active
October 26, 2016 08:28
-
-
Save 4ndrej/84367905fec10d2670f94970e6552c58 to your computer and use it in GitHub Desktop.
gradle to maven deps filter
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
cat build.gradle\ | |
| awk '{$1=$1};1'\ | |
| grep -i "compile "\ | |
| sed -e "s/^compile //Ig" -e "s/^testCompile //Ig"\ | |
| sed -e "s/\/\/.*//g"\ | |
| sed -e "s/files(.*//g"\ | |
| grep -v ^$\ | |
| tr -d "'"\ | |
| sed -e "s/\([-_[:alnum:]\.]*\):\([-_[:alnum:]\.]*\):\([-+_[:alnum:]\.]*\)/<dependency>\n\t<groupId>\1<\/groupId>\n\t<artifactId>\2<\/artifactId>\n\t<version>\3<\/version>\n<\/dependency>/g" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment