Merge pull request #65720 from enumatech/gradle-major-versions

gradle: declare package major versions
This commit is contained in:
adisbladis 2019-08-06 19:07:13 +01:00 committed by GitHub
commit 06260734de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 7 deletions

View File

@ -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";

View File

@ -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.