openrewrite / rewrite-gradle-plugin

OpenRewrite's Gradle plugin.
Apache License 2.0
60 stars 37 forks source link

Add ability to export dataTables #310

Closed ryanwalker closed 2 months ago

ryanwalker commented 2 months ago

What's changed?

Added the ability to export data tables.

What's your motivation?

I was reading about them in the docs and found that they were only implemented in maven and there was a request to add them to the gradle plugin.

I did see that this open issue that talks about adding some configuration that would allow you more control over turning certain csv exports on or off. From a cursory look, it seems like I might have to change rewrite-core for that to work. I'm not opposed to doing that, but I thought I'd create this PR to get thoughts before moving too far forward.

I did not add any tests yet either. I'll be more than happy to update this to a prod-ready state.

I added to the RewriteExtension:

rewrite {
    exportDatatables = true
}

It defaults to false.

Here's a screenshot of the cvs file output: image

Anything in particular you'd like reviewers to focus on?

Anyone you would like to review specifically?

Have you considered any alternatives or workarounds?

Any additional context

Checklist

timtebeek commented 2 months ago

Thanks a lot for closing the gap here. Indeed seems like a mostly straightforward add with most functionality in core. I'll take a closer look after the weekend, but suspect that we should be able to add this pretty soon next week