Skip to content
This repository has been archived by the owner on Jul 29, 2021. It is now read-only.

Existing gradlew breaks with Java version 14 #298

Open
akshit-sharma opened this issue Jun 23, 2020 · 2 comments
Open

Existing gradlew breaks with Java version 14 #298

akshit-sharma opened this issue Jun 23, 2020 · 2 comments

Comments

@akshit-sharma
Copy link

akshit-sharma commented Jun 23, 2020

While building the vulkan on android, the gradlew contains the version 5.1.1.

Steps to reproduce:

$ # Don't have any gradle installed on system
$ # Install JDK 14
$ git clone --recursive https://github.com/LunarG/VulkanSamples.git
$ cd VulkanSamples/API-Samples
$ cmake -DANDROID=ON -DABI_NAME=x86_64
$ cd android
$ python3 compile_shaders.py
$ export ANDROID_SDK_ROOT=/path/to/sdk-directory
$ export ANDROID_NDK_HOME=/path/to/ndk-directory
$ ./gradlew build

While trying to compile ./gradlew build, it gives following error.

FAILURE: Build failed with an exception.

* What went wrong:
Could not create an instance of type org.gradle.initialization.DefaultSettings_Decorated.
> Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

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

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

BUILD FAILED in 0s

According to issue #12599 on gradle, this can be resolved by updating the gradle to 6.3 or higher.

Here is the output from ./gradlew --version:

akshit@StealthUbuntu:~/Projects/VulkanSamples/API-Samples/android$ ./gradlew --version

------------------------------------------------------------
Gradle 5.1.1
------------------------------------------------------------

Build time:   2019-01-10 23:05:02 UTC
Revision:     3c9abb645fb83932c44e8610642393ad62116807

Kotlin DSL:   1.1.1
Kotlin:       1.3.11
Groovy:       2.5.4
Ant:          Apache Ant(TM) version 1.9.13 compiled on July 10 2018
JVM:          14.0.1 (Oracle Corporation 14.0.1+7)
OS:           Linux 5.4.0-37-generic amd64

I am unable to figure out, How to make gradlew have version > 6.5 ?
Does the VulkanSamples have to update something?

Thanks

@TonyBarbour
Copy link
Contributor

@ggfan could you take a look?

@ggfan
Copy link
Contributor

ggfan commented Jul 6, 2020

you could change gradle version in this file: https://github.com/LunarG/VulkanSamples/blob/master/API-Samples/android/gradle/wrapper/gradle-wrapper.properties

Android studio is still using java8 though: it has its own open JDK version inside its package.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants