Issue following creating-a-new-module-gradle course

Hello All,

I was just following along Creating a New Module (Gradle) Video at Inductive University, trying to make a new module starting point. I didn't have an issue building the scripting-function-g module from the previous video (in IntelliJ IDEA), but when I followed from command prompt 'gradlew.bat clean build' (run as admin), it gave me this error.

As I'm pretty new to git / gradle (I don't even know where that log is? I tried running with --debug and --scan but wasn't sure what to look for), I'm not sure how to diagnosis what went wrong; so any help would be appreciated!

"Internal compiler error" suggests just that - an internal compiler error :slight_smile:

Try removing the .gradle folder in the project directory completely - it's just a cache, so it will be rebuilt the next time you gradlew.bat build.

Followed those instructions, trying both 'clean build' and 'build' (Is clean even required if I'm starting from a fresh clone of the tools?), both still failed with the same error message.

Can you try with the --stacktrace option and copy the text output here?

See attached. I appreciate the help!

gradlew.bat clean build issue stacktrace.txt (27.5 KB)

What Gradle version are you using, and what Java version are you using?

C:\Users[USER]>gradle -v


Gradle 8.5

Build time: 2023-11-29 14:08:57 UTC
Revision: 28aca86a7180baa17117e0e5ba01d8ea9feca598

Kotlin: 1.9.20
Groovy: 3.0.17
Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM: 21.0.1 (Azul Systems, Inc. 21.0.1+12-LTS)
OS: Windows 10 10.0 amd64

Try using a Java 17 runtime.

1 Like

Can you remind me how to change where Gradle points at? I uninstalled 21 and installed 17. Both java -version and echo %JAVA_HOME% are pointing at the correct location/version, but when I try a new build it immediately fails saying it tried the old -21\bin.

I followed the video showing how to install Java, and added it to the Java Path, but apparently there's a missing link.

I went into the pointer location and removed the empty folder of -21. Apparently that's all it needed, as the build just worked no problems.

Thanks @PGriffith!

1 Like