Skip to content

Commit a32926f

Browse files
committed
Log error to console
1 parent 6062da1 commit a32926f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/main/kotlin/GradleKotlinConverter.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
object GradleKotlinConverter {
44

55
fun convert(groovyCode: String): String? = kotlin.runCatching {
6-
groovyCode
6+
groovyCode
77
.replaceApostrophes()
88
.replaceDefWithVal()
99
.convertMapExpression() // Run before array
@@ -40,7 +40,10 @@ object GradleKotlinConverter {
4040
.addParenthesisToId()
4141
.replaceColonWithEquals()
4242

43-
}.getOrNull()
43+
}.getOrElse {
44+
println("Conversion failed: $it")
45+
null
46+
}
4447

4548

4649
// anything with ' ('1.0.0', 'kotlin-android', 'jitpack', etc)

0 commit comments

Comments
 (0)