moderneinc / rewrite-recipe-starter

A forkable starter for building your own recipes and deploying them on the Moderne SaaS
25 stars 41 forks source link

[RFC] Add an `.sdkmanrc`? #58

Open Philzen opened 2 weeks ago

Philzen commented 2 weeks ago

Since discovering SDKMAN! none of my projects goes without it – it also nicely eliminates the need for any wrappers.

As i believe i also saw it mentioned somewhere in the docs, why not add an .sdkmanrc as a QOL improvement?

Philzen commented 2 weeks ago

Ideally one would have an option when generating a project from this template whether wrappers or SDKMAN! are preferred.

If the latter is chosen, the wrappers would be omitted from the repo (saving ~72 KB in initial repository size, some of which are binaries which aren't good git citizens anyway), otherwise .sdkmanrc would be omitted. I guess the CI workflows would need tweaking as well, but that'd be no rocket science, done that before.

The most clean solution i could think of and would really love, not sure if Github templates offer such a functionality though.

timtebeek commented 2 weeks ago

I like the suggestion of adding a .sdkmanrc file to the repository, just to drive home that we require at least Java 17. We might want to write a recipe to keep the patch version updated automatically going forward though, as to not pin to older versions.

Do I understand correctly that you'd also want to use .sdkmanrc to manage the versions of Maven and Gradle, as opposed to the wrappers? In part we use the wrappers as they work well with GitHub Actions, and for folks without sdkman installed.

I had a brief look at https://github.com/sdkman/sdkman-action, but I'm not sure if that would play as well with GitHub Actions cache as actions/setup-java does.