bernaferrari / GradleKotlinConverter

Convert from Groovy to Kotlin DSL for Gradle, focused on Android.
https://gradle-kotlin-converter.vercel.app
Apache License 2.0
921 stars 61 forks source link

Update script to support buildFeature block #46

Closed WhosNickDoglio closed 1 year ago

WhosNickDoglio commented 2 years ago

This adds support for converting the buildFeatures block!

I'm bad at regex so instead of updating addEquals to better filter out false positives I created a new convertBuildFeatures function at the end that will look for all the buildFeatures and what they're set to and then update them to include the equals.

Let me know if this is okay or if you'd preview something a little smarter 😅

bernaferrari commented 2 years ago

That looks great! Should I merge? You opened as a draft.

WhosNickDoglio commented 2 years ago

Sorry I wasn't expecting such a quick response I was going to add a TODO 😅

Currently this supports all buildFeatures except compose and just adding it to buildFeatures property will break a bunch of other things in the file, I'm going to work on this more later this week when I have more time!

WhosNickDoglio commented 1 year ago

@bernaferrari this is now ready for review whenever you get a chance 👍

bernaferrari commented 1 year ago

Perfect, thanks!