From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1BABD15800F for ; Fri, 6 Jan 2023 14:53:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5478DE07D1; Fri, 6 Jan 2023 14:53:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 406CCE07D1 for ; Fri, 6 Jan 2023 14:53:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 55E62340C7C for ; Fri, 6 Jan 2023 14:53:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DBFC676F for ; Fri, 6 Jan 2023 14:53:10 +0000 (UTC) From: "Florian Schmaus" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Florian Schmaus" Message-ID: <1673016512.5f9b10dea4332283361b38bccb8f7b7ed186fa9e.flow@gentoo> Subject: [gentoo-commits] proj/java:master commit in: eclass/ X-VCS-Repository: proj/java X-VCS-Files: eclass/gradle.eclass X-VCS-Directories: eclass/ X-VCS-Committer: flow X-VCS-Committer-Name: Florian Schmaus X-VCS-Revision: 5f9b10dea4332283361b38bccb8f7b7ed186fa9e X-VCS-Branch: master Date: Fri, 6 Jan 2023 14:53:10 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e1e4f349-982e-4bba-a3a8-701e70580848 X-Archives-Hash: 2bf9259442af925f776846056eb7a53d commit: 5f9b10dea4332283361b38bccb8f7b7ed186fa9e Author: Florian Schmaus gentoo org> AuthorDate: Fri Jan 6 14:48:32 2023 +0000 Commit: Florian Schmaus gentoo org> CommitDate: Fri Jan 6 14:48:32 2023 +0000 URL: https://gitweb.gentoo.org/proj/java.git/commit/?id=5f9b10de gradle.eclass: update Signed-off-by: Florian Schmaus gentoo.org> eclass/gradle.eclass | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/eclass/gradle.eclass b/eclass/gradle.eclass index 09eda636..90e21905 100644 --- a/eclass/gradle.eclass +++ b/eclass/gradle.eclass @@ -32,6 +32,17 @@ inherit edo # @DESCRIPTION: # First gradle version that is not supported. +# @ECLASS_VARIABLE: EGRADLE_EXACT_VER +# @DEFAULT_UNSET +# @DESCRIPTION: +# The exactly required gradle version. + +# @ECLASS_VARIABLE: EGRADLE_PARALLEL +# @DESCRIPTION: +# Set to the 'true', the default, to invoke gradle with --parallel. Set +# to 'false' to disable parallel gradle builds. +: ${EGRADLE_PARALLEL=true} + # @ECLASS_VARIABLE: EGRADLE_USER_HOME # @DESCRIPTION: # Directroy used the user's home directory by gradle. @@ -69,6 +80,14 @@ gradle-set_EGRADLE() { ver="${BASH_REMATCH[1]}" fi + if [[ -n ${EGRADLE_EXACT_VER} ]]; then + ver_test "${ver}" -ne ${EGRADLE_EXACT_VER} && continue + + selected="${candidate}" + selected_ver="${ver}" + break + fi + if [[ -n ${EGRADLE_MIN} ]] \ && ver_test "${ver}" -lt "${EGRADLE_MIN}"; then # Candidate does not satisfy EGRADLE_MIN condition. @@ -113,12 +132,15 @@ egradle() { --stacktrace --no-daemon --offline - --parallel --no-build-cache --gradle-user-home "${EGRADLE_USER_HOME}" --project-cache-dir "${T}/gradle_project_cache" ) + if $EGRADLE_PARALLEL; then + gradle_args+=( --parallel ) + fi + local -x JAVA_TOOL_OPTIONS="-Duser.home=\"$T\"" # TERM needed, otherwise gradle may fail on terms it does not know about TERM=xterm \