Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Anyone know tools/plugin/script to convert build.gradle groovy to kts easily?

Android Studio Giraffe was released and the recommended build configuration language is now Kotlin DSL (build.gradle.kts) and not Groovy DSL (build.gradle). I want to update my existing project from Groovy to KTS. I know the step-by-step migration guide. But, is there any tool to convert it easily? Such as some scripts or plugins?

I just found https://gradle-kotlinize.web.app/ but it does not convert properly.

Screenshot

There is no parenthesis at implementation conversion and it will result in an error if we add compileOptions code.

Any suggestion is very helpful. Thanks!

like image 868
Ahmad Arif Faizin Avatar asked Sep 13 '25 21:09

Ahmad Arif Faizin


1 Answers

After some research, I found that the terminal version working well. You can follow the tutorial at https://github.com/bernaferrari/GradleKotlinConverter.

But if you have other tools, especially using GUI. Please answer below.

like image 66
Ahmad Arif Faizin Avatar answered Sep 16 '25 10:09

Ahmad Arif Faizin