Skip to content

Instantly share code, notes, and snippets.

Avatar

Joshua Davis joshuadavis

  • New York City
View GitHub Profile
@joshuadavis
joshuadavis / convertIvyDeps.gradle
Last active Aug 29, 2015
Ivy XML Converter Gradle Task
View convertIvyDeps.gradle
task convertIvyDeps << {
def ivyXml = new XmlParser().parse(new File("ivy.xml"))
ivyXml.dependencies.dependency.each {
def scope = it.@conf?.contains("test") ? "testCompile" : "compile"
println("\t$scope '${it.@org}:${it.@name}:${it.@rev}'")
}
}
View ivyConverter.groovy
println("dependencies {")
def ivyModule = new XmlParser().parse(new File('ivy.xml'))
ivyModule.dependencies.dependency.each {
def scope = it.@conf?.contains("test") ? "testCompile" : "compile"
println("\t$scope '${it.@org}:${it.@name}:${it.@rev}'")
}
println("}")
You can’t perform that action at this time.