Created
February 24, 2014 22:06
-
-
Save abyrd/9198195 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
#!/usr/bin/env python | |
# Helps create Gradle dependency lists by processing output of: | |
# mvn dependency:list -DexcludeTransitive=true | cut -c11- > deps.txt | |
# Note: Install gradle manually, the package is broken on Ubuntu. | |
with open("deps.txt") as f: | |
deps = [] | |
for line in f.readlines() : | |
fields = [x.strip() for x in line.split(':')] | |
if len(fields) < 5 : continue | |
del fields[2] # remove 'jar' | |
deps.append(fields) | |
deps.sort(key = lambda x: x[0:2]) | |
for fields in deps : | |
print fields[3], "'%s'" % (':'.join(fields[:3])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment