Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A basic conversion script from Maven to Gradle dependencies
#!/bin/sh
echo 'dependencies {'
xmlstarlet sel -T \
-N pom="http://maven.apache.org/POM/4.0.0" \
-t -m '//pom:dependency' \
-o " compile '" \
-v 'pom:groupId' \
-o ':' \
-v 'pom:artifactId' \
-o ':' \
-v 'pom:version' \
-o "'" \
-n \
pom.xml
echo '}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment