1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-29 13:41:03 +01:00
home-manager/tests/modules/programs/gradle/example-settings.nix
Austin Horstman cba2f9ce95 treewide: reformat nixfmt-rfc-style
Reformat repository using new nixfmt-rfc-style.
2025-04-08 08:50:05 -07:00

33 lines
815 B
Nix

{ pkgs, ... }:
{
programs.gradle = {
enable = true;
settings = {
"org.gradle.caching" = true;
"org.gradle.parallel" = true;
"org.gradle.java.home" = pkgs.jdk17;
"org.gradle.java.installations.paths" = "${pkgs.jdk8},${pkgs.jdk11}";
};
};
programs.java.package = pkgs.runCommandLocal "java" { home = ""; } "mkdir $out";
test.stubs = {
jdk8 = { };
jdk11 = { };
jdk17 = { };
};
nmt.script = ''
assertFileExists home-files/.gradle/gradle.properties
assertFileContent home-files/.gradle/gradle.properties ${builtins.toFile "gradle.expected" ''
# Generated with Nix
org.gradle.caching = true
org.gradle.java.home = @jdk17@
org.gradle.java.installations.paths = @jdk8@,@jdk11@
org.gradle.parallel = true
''}
'';
}