Opened 8 months ago
Closed 7 months ago
#72888 closed defect (fixed)
apktool v2.12.0 build failure with gradle 9.0.0 and a wrong Java version
| Reported by: | yaroslav-v (comrade) | Owned by: | i0ntempest |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 2.11.5 |
| Keywords: | sequoia, x86_64 | Cc: | amake (Aaron Madlon-Kay) |
| Port: | apktool |
Description
Recently, I tried to upgrade apktool, along with all outdated ports, but build failed because of a wrong Java version.
Exception is: :info:build org.gradle.internal.jvm.UnsupportedJavaRuntimeException: Gradle requires JVM 17 or later to run. Your build is currently configured to use JVM 8.
According to the logs, the problem leads to Gradle. Right now Macports has the only version available and it's Gradle v9.0.0 which demands Java v17 or higher.
I have openjdk17 installed in the system and JAVA_HOME set up as well. This environment works fine in other circumstances. However, for some reason Macports has a wrong JAVA_HOME value set. Looks like it falls back to Java 8 installed by default in macOS.
Unfortunatelly, Macports doesn't have any older builds of Gradle to test and I didn't found any other way to pass a correct Java settings except using a symlink. The symlink to a correct Java version allows it to start building but it fails on a later stage then.
The original crashlog is attached.
Attachments (1)
Change History (7)
Changed 8 months ago by yaroslav-v (comrade)
comment:1 Changed 8 months ago by jmroot (Joshua Root)
| Cc: | i0ntempest@… removed |
|---|---|
| Owner: | set to i0ntempest |
| Status: | new → assigned |
comment:2 Changed 8 months ago by i0ntempest
comment:4 Changed 8 months ago by amake (Aaron Madlon-Kay)
Yes, if you need a specific, older version of Gradle then I would suggest adding an e.g. gradle8 port.
comment:5 Changed 7 months ago by i0ntempest <i0ntempest@…>
comment:6 Changed 7 months ago by i0ntempest <i0ntempest@…>
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |

Probably need to add gradle 8 back as a new port. No ETA tho.