When working in a terminal with gradle 5.6.1 many things work as expected. E.g. changing to an older java version (1). If I change to gradle 3.4 gradle does not find the jdk any more (1).
How do I get gradle 3.4 working on my system again.
I would like build a project I once made with gradle 3.4. However, I have no gradle wrapper and the build seems broken due to changes to gradle 5.6.1.
(1)
user@system:~$ sdk u gradle 3.4
Using gradle version 3.4 in this shell.
user@system:~$ gradle -v
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine java version from '11.0.5'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
user@system:~$ sdk u java 9.0.4
Stop! java 9.0.4 is not available. Possible causes:
* 9.0.4 is an invalid version
* java binaries are incompatible with Linux64
* java has not been released yet
user@system:~$ sdk u java 9.0.4-open
Using java version 9.0.4-open in this shell.
user@system:~$ gradle
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine java version from '9.0.4'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
(2)
user@system:~$ gradle -v
------------------------------------------------------------
Gradle 5.6.1
------------------------------------------------------------
Build time: 2019-08-28 02:49:34 UTC
Revision: b6bd8e7934ca41d9e52610058aa7cb834df81fc4
Kotlin: 1.3.41
Groovy: 2.5.4
Ant: Apache Ant(TM) version 1.9.14 compiled on March 12 2019
JVM: 11.0.5 (Debian 11.0.5+10-post-Debian-1deb10u1)
OS: Linux 4.19.0-6-amd64 amd64
user@system:~$ sdk u java 9.0.4-open
Using java version 9.0.4-open in this shell.
user@system:~$ gradle -v
------------------------------------------------------------
Gradle 5.6.1
------------------------------------------------------------
Build time: 2019-08-28 02:49:34 UTC
Revision: b6bd8e7934ca41d9e52610058aa7cb834df81fc4
Kotlin: 1.3.41
Groovy: 2.5.4
Ant: Apache Ant(TM) version 1.9.14 compiled on March 12 2019
JVM: 9.0.4 (Oracle Corporation 9.0.4+11)
OS: Linux 4.19.0-6-amd64 amd64