google / accompanist

A collection of extension libraries for Jetpack Compose
https://google.github.io/accompanist
Apache License 2.0
7.43k stars 598 forks source link

[Suggestion] Migrate gradle files from Groovy to Kotlin DSL #1578

Closed oas004 closed 1 year ago

oas004 commented 1 year ago

Hey!

First of all, thanks for a great library!

This is just a suggestion and I wanted to know what you guys thought about it. Feel free to close it, if it does not make sense.

I noticed that all the gradle files are in Groovy, what do you guys think about converting it to Kotlin DSL? Is there a reason for not migrating or any downside to migrating? :)

I would love to help out and contribute if this is okay :)

One suggested approach to this as we did when migrating in the horologist project is the following:

  1. Go module by module prepare the Groovy scripts following the steps described here. Then make a PR for each module to keep it easy to review.
  2. Do the actual conversion of the file to .kts and check that it compiles and that everything works as expected. Then make a PR for each module, to make it easy to review.

One tool that might help migrate is this script to convert Groovy to Kotlin DSL. I have not tried it myself though.

bentrengrove commented 1 year ago

Thanks for the suggestion. We would definitely accept this as a contribution if you are open to doing it!

I agree with your plan to do it module by module.

oas004 commented 1 year ago

I would love to! :) I will try to prioritize this :)

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

bentrengrove commented 1 year ago

I guess stalebot can't see all the PRs

oas004 commented 1 year ago

Just to give a status update here is that currently 22/27 groovy files are now in Kotlin DSL :) We have PRs up on the rest except the project gradle file. I will do that when everything else is in. When that is done my thoughts where to set the target and source java versions to 11 and to update the plugins to using version catalog correctly :) Then I think we can also bump the AGP version as of #1617

bentrengrove commented 1 year ago

Thank you for all your effort!

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.