Hi all,
these days I mostly write code for the JVM using the gradle build system.
When I setup my laptop with NixOS I just wanted to install the JDK and gradle system-wide, e.g. in /etc/nixos/configuration.nix. Tbh, I just found this easier than fiddling around with nix-shell (which I want to learn a bit later once I get to speed with NixOS).
Installing gradle and the JDK is fairly easy, however, a dependency of the project needs JDK 11 or higher - so I added gradle and jdk14 to my systemPackages only to find out that gradle uses a different version of Java, which in this case is Java 8 - and now loading the dependencies classes on runtime fails. After googling for a while I’m almost certain that I need to use the Overlay mechanism.
My question now is how I can solve the problem with gradle precisely - I think I need an overlay for gradle and override it’s build inputs. Sadly, I don’t know enough about Overlays at the moment to write this overlay on my own.
Can anyone provide a hint for me?
I’m thankful for every advice
Thanks for reading this!