rewrite icon indicating copy to clipboard operation
rewrite copied to clipboard

Polish the Gradle build's configuration phase

Open shanman190 opened this issue 7 months ago • 3 comments

What's changed?

Gradle build cleanup.

Before: 1m 58s After: 18s

What's your motivation?

Get to actually having Gradle do work sooner

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

rewrite-javascript had a bit of restructuring, but is fundamentally the same. It should be reviewed carefully though.

Several of the previous rewrite-javascript tasks were using the node-gradle plugin's internal Gradle rule (ie. npm_* which resulted in eager task creation).

Anyone you would like to review specifically?

Anybody

Have you considered any alternatives or workarounds?

N/A

Any additional context

There are additional pieces that can be cleaned up. There are several plugins -- the license plugin being the worst offender -- that still eagerly create tasks and we could investigate next enabling configuration cache as well.

Checklist

  • [x] I've added unit tests to cover both positive and negative cases
  • [x] I've read and applied the recipe conventions and best practices
  • [x] I've used the IntelliJ IDEA auto-formatter on affected files

shanman190 avatar Jun 12 '25 00:06 shanman190

I'll investigate the build failure for rewrite-javascript. My bet is that it's missing a npmInstall task dependency.

shanman190 avatar Jun 12 '25 00:06 shanman190

@sambsnyd / @jkschneider this seems a clear performance boost to the builds and the responsiveness in the IDE, but of course we've not been able to test drive the publication for rewrite-javascript while on a branch. Are you comfortable merging this in and watch the snapshot publish from there? Or would you rather hold off until a better moment as to not get in the way of being able to release at any moment?

timtebeek avatar Jun 13 '25 14:06 timtebeek

I'll plan to fix the merge conflicts from the recent JS changes from Knut in order to make this PR mergable again. This'll include optimizing any newly introduced tasks from Knut's PR as well.

shanman190 avatar Jun 13 '25 20:06 shanman190

Alright, I ended up reapplying my first commit in isolation without rewrite-javascript on top of the latest main. Then redoing the rewrite-javascript updates because there were a few too many changes to keep the direct merge straight for.

I did opt to take rewrite-javascript a little bit further with this latest refactor, but there's still a lot more that can be done.

shanman190 avatar Jun 18 '25 20:06 shanman190

Thanks @shanman190 !

sambsnyd avatar Jun 25 '25 20:06 sambsnyd