Package Details: gradle7 7.6-1

Git Clone URL: https://aur.archlinux.org/gradle7.git (read-only, click to copy)
Package Base: gradle7
Description: Powerful build system for the JVM (version 7)
Upstream URL: https://gradle.org/
Licenses: Apache
Submitter: patlefort
Maintainer: patlefort
Last Packager: patlefort
Votes: 2
Popularity: 1.12
First Submitted: 2023-03-14 21:33 (UTC)
Last Updated: 2023-05-27 14:43 (UTC)

Dependencies (13)

Sources (3)

Latest Comments

m3thodic commented on 2023-05-27 04:59 (UTC) (edited on 2023-05-27 04:59 (UTC) by m3thodic)

This patch fixes building gradle7 by explicitly defining jdk11-openjdk.

diff --git a/PKGBUILD b/PKGBUILD
index 5774587..438bc87 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,13 +4,13 @@ _pkgbase=gradle
 pkgbase=gradle7
 pkgname=('gradle7' 'gradle7-doc' 'gradle7-src')
 pkgver=7.6
-pkgrel=1
+pkgrel=2
 pkgdesc='Powerful build system for the JVM (version 7)'
 url='https://gradle.org/'
 arch=('any')
 license=('Apache')
 depends=('java-environment' 'bash' 'which' 'coreutils' 'findutils' 'sed')
-makedepends=('git' 'asciidoc' 'xmlto' 'groovy' 'java-environment=11')
+makedepends=('git' 'asciidoc' 'xmlto' 'groovy' 'jdk11-openjdk')
 source=("https://services.gradle.org/distributions/${_pkgbase}-${pkgver}-src.zip"
         "https://services.gradle.org/distributions/${_pkgbase}-${pkgver}-all.zip"
         ${pkgbase})
@@ -41,6 +41,7 @@ build() {
   cd "${_srcdir}"
   # requires java language level 6, which >=13 has dropped
   export PATH="/usr/lib/jvm/java-11-openjdk/bin:${PATH}"
+  export JAVA_HOME="/usr/lib/jvm/java-11-openjdk"
   ./gradlew installAll \
     -Porg.gradle.java.installations.auto-download=false \
     -PfinalRelease=true \

emgaron commented on 2023-05-18 18:20 (UTC) (edited on 2023-05-18 18:20 (UTC) by emgaron)

Update: after installing jdk11-openjdk in parallel with liberica-jdk-11-full-bin, the build still printed several warnings

Invalid Java installation found at '/usr/lib/jvm/java-11-openjfx' (Common Linux Locations). It will be re-checked in the next build. This might have performance impact if it keeps failing. Run the 'javaToolchains' task for more details.

Despite this, the build succeeded --> solved.

emgaron commented on 2023-05-18 13:16 (UTC)

I have liberica-jdk-11-full-bin 11.0.19.u7-1 installed - it's been a while, but IIRC, I used this specific version due to ganttproject complaining about missing features in the normal OpenJDK 11 - I'll have to look into temporarily installing jdk11-openjdk instead to see whether that changes anything.

As for java-11-openjfx - the only reason I'm trying to build gradle7 is because the latest version of java-11-openjfx requires it...

patlefort commented on 2023-05-17 01:28 (UTC)

Did you install jdk11-openjdk? I don't have a hard requirement on it and I can see that is it trying to use java-11-openjfx on your machine but I don't know why. Maybe try removing whatever is providing openjfx or build in a clean chroot.

emgaron commented on 2023-05-14 17:38 (UTC)

I'm having the same (or very similar) issue and the build fails:

==> Starting build()...
Starting a Gradle Daemon (subsequent builds will be faster)
Run [git, rev-parse, HEAD] in /usr/local/aux/AUR/gradle7/src/gradle-7.6 returns 128, outputs:

fatal: not a git repository (or any of the parent directories): .git
Run [git, status, --porcelain] in /usr/local/aux/AUR/gradle7/src/gradle-7.6 returns 128, outputs:

fatal: not a git repository (or any of the parent directories): .git
Run [git, rev-parse, --abbrev-ref, HEAD] in /usr/local/aux/AUR/gradle7/src/gradle-7.6 returns 128, outputs:

fatal: not a git repository (or any of the parent directories): .git
Type-safe project accessors is an incubating feature.

> Configure project :
Invalid Java installation found at '/usr/lib/jvm/java-11-openjfx' (Common Linux Locations). It will be re-checked in the next build. This might have performance impact if it keeps failing. Run the 'javaToolchains' task for more details.

> Task :build-logic:binary-compatibility:compileJava FAILED
> Task :build-logic:cleanup:compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':build-logic:binary-compatibility:compileJava'.
> error: release version 11 not supported

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.6/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1m 22s
125 actionable tasks: 3 executed, 122 up-to-date

A build scan was not published as you have not authenticated with server 'ge.gradle.org'.
For more information, please see https://gradle.com/help/gradle-authenticating-with-gradle-enterprise.
==> ERROR: A failure occurred in build().
Aborting...

gnaggnoyil commented on 2023-05-11 06:38 (UTC)

I met the following error when I ran makepkg -s:

==> 正在开始 build()...
Type-safe project accessors is an incubating feature.

> Configure project :
Invalid Java installation found at '/usr/lib/jvm/java-11-openjfx' (Common Linux Locations). It will be re-checked in the next build. This might have performance impact if it keeps failing. Run the 'javaToolchains' task for more details.

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':reporting:reportResources'.
> Could not resolve all task dependencies for configuration ':reporting:implementationResources'.
   > Could not resolve jquery:jquery.min:3.5.1.
     Required by:
         project :reporting
      > Skipped due to earlier error

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.6/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 2m 2s
219 actionable tasks: 88 executed, 131 from cache

Is there anyone having idea about what could possibly go wrong?