14 lines
459 B
Plaintext
14 lines
459 B
Plaintext
# parses an xml string to maven dependency artifact
|
|
export def "from maven-dep" [] {
|
|
get content
|
|
| each { |tag| { tag: $tag.tag, value: ($tag.content | get content | first ) } }
|
|
| reduce -f {} {|it, acc| $acc | upsert $it.tag $it.value }
|
|
|
|
}
|
|
|
|
# construct a gradle dependency from a dependency artifact
|
|
export def "to gradle-dep" [dep_type:string] {
|
|
let dep = $in
|
|
$"($dep_type)\(\"($dep.groupId):($dep.artifactId):($dep.version)\"\)"
|
|
}
|