-
-
Save MaxNevermind/377d93796f2e441652db5ccce4617144 to your computer and use it in GitHub Desktop.
Convert pom.xml to build.sbt
This file contains 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
val lines = (scala.xml.XML.load("pom.xml") \\ "dependencies") \ "dependency" map { dependency => | |
val groupId = (dependency \ "groupId").text | |
val artifactId = (dependency \ "artifactId").text | |
val version = (dependency \ "version").text | |
val scope = (dependency \ "scope").text match { | |
case "" => "" | |
case x => s""" % "$x"""" | |
} | |
s"""libraryDependencies += "$groupId" % "$artifactId" % "$version"$scope""" | |
} | |
lines foreach println |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment