1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-18 17:19:45 +01:00
home-manager/tests/modules/programs/gradle/example-settings.nix

43 lines
978 B
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
with lib;
{
config = {
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 = {
gradle = { };
jdk = { };
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
''
}
'';
};
}