diff --git a/pkgs/development/tools/build-managers/gradle/default.nix b/pkgs/development/tools/build-managers/gradle/default.nix index 25ff6d09d420..0ec57cc8b82c 100644 --- a/pkgs/development/tools/build-managers/gradle/default.nix +++ b/pkgs/development/tools/build-managers/gradle/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, unzip, jdk, makeWrapper }: +{ stdenv, fetchurl, unzip, jdk, java ? jdk, makeWrapper }: rec { gradleGen = {name, src, nativeVersion} : stdenv.mkDerivation rec { @@ -12,8 +12,8 @@ rec { gradle_launcher_jar=$(echo $out/lib/gradle/lib/gradle-launcher-*.jar) test -f $gradle_launcher_jar - makeWrapper ${jdk}/bin/java $out/bin/gradle \ - --set JAVA_HOME ${jdk} \ + makeWrapper ${java}/bin/java $out/bin/gradle \ + --set JAVA_HOME ${java} \ --add-flags "-classpath $gradle_launcher_jar org.gradle.launcher.GradleMain" ''; @@ -33,7 +33,7 @@ rec { echo ${stdenv.cc.cc} > $out/nix-support/manual-runtime-dependencies ''; - buildInputs = [ unzip jdk makeWrapper ]; + buildInputs = [ unzip java makeWrapper ]; meta = { description = "Enterprise-grade build system"; @@ -51,7 +51,9 @@ rec { }; }; - gradle_latest = gradleGen rec { + gradle_latest = gradle_5_3; + + gradle_5_3 = gradleGen rec { name = "gradle-5.3.1"; nativeVersion = "0.17"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8b1bbb5a7f70..96737537c9ba 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9454,12 +9454,18 @@ in gputils = callPackage ../development/tools/misc/gputils { }; - gradleGen = callPackage ../development/tools/build-managers/gradle { }; + gradleGen = callPackage ../development/tools/build-managers/gradle { + java = jdk; + }; gradle = res.gradleGen.gradle_latest; - gradle_2_14 = res.gradleGen.gradle_2_14; gradle_2_5 = res.gradleGen.gradle_2_5; + gradle_2_14 = res.gradleGen.gradle_2_14; gradle_3_5 = res.gradleGen.gradle_3_5; gradle_4_10 = res.gradleGen.gradle_4_10; + gradle_2 = gradle_2_14; + gradle_3 = gradle_3_5; + gradle_4 = gradle_4_10; + gradle_5 = res.gradleGen.gradle_5_3; gperf = callPackage ../development/tools/misc/gperf { }; # 3.1 changed some parameters from int to size_t, leading to mismatches.