Skip to content

Commit

Permalink
Improve Maven conversion. Fix #15.
Browse files Browse the repository at this point in the history
  • Loading branch information
bernaferrari committed Mar 18, 2020
1 parent d5cf14f commit 8f8592e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions expected_build_gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ allprojects {
repositories {
google()
jcenter()
maven("https://jitpack.io")
maven("https://maven.fabric.io/public")
maven("https://dl.bintray.com/kotlin/kotlin-eap")
}
Expand Down
2 changes: 1 addition & 1 deletion gradlekotlinconverter.kts
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ fun String.convertMaven(): String {
val mavenExp = "maven\\s*\\{\\s*url\\s*(.*?)\\s*?}".toRegex()

return this.replace(mavenExp) {
it.value.replace("(url)|( )".toRegex(), "")
it.value.replace("(= *uri *\\()|\\)|(url)|( )".toRegex(), "")
.replace("{", "(")
.replace("}", ")")
}
Expand Down
1 change: 1 addition & 0 deletions test_build_gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ allprojects {
repositories {
google()
jcenter()
maven { url = uri("https://jitpack.io") }
maven { url 'https://maven.fabric.io/public' }
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
}
Expand Down

0 comments on commit 8f8592e

Please sign in to comment.