openrewrite / rewrite

Automated mass refactoring of source code.
https://docs.openrewrite.org
Apache License 2.0
2.03k stars 300 forks source link

Dependency management support for Gradle Kotlin scripts #3291

Open sambsnyd opened 1 year ago

sambsnyd commented 1 year ago

What problem are you trying to solve?

Gradle supports Groovy and Kotlin as scripting languages for build files. We currently support editing Groovy-based build files. This should be extended to Kotiln.

Describe the solution you'd like

For each Gradle-groovy dependency management recipe there should be a Gradle-kotlin equivalent.

Additional context

Requires some enhancements to rewrite-kotlin and rewrite-gradle.

wakingrufus commented 9 months ago

I have an example use case here: currently, AddDependency, it adds dependencies without () around the string portion of the dependency. in groovy, either way is correct, but in kts, the () must be there.