I'm having quite a bit of trouble with ./gradlew
. I am trying to make a 1.14.4 mod, and have been having a lot of problems with gradle
, but I've finally got gradle
working (an error in my build.gradle
code). I'm on a Mac, and my friend (with whom I am building the mod) is not, and running
./gradle wrapper
works fine on his computer but not on mine. It must be a system issue, but I'm really not sure. The error I keep getting is:
Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory().
> Could not create service of type FileHasher using BuildSessionScopeServices.createFileSnapshotter().
I've looked online, and all of the work-arounds I have found doesn't help me. Running ./gradlew wrapper
with --info
I get this. Running with --stacktrace
, I get this. Finally, with --debug
I get this. I don't know if these are helpful (I'm sure they are, if you know what to look for).
Any insights into what on earth is causing this is greatly appreciated!
P.S.: my made-up username in the pastebin links is drdeducer
:)
P.P.S.: it isn't just ./gradlew wrapper
that doesn't work; it is ./gradlew <anything>
—even just ./gradlew
!
Found the problem for me. In the process of trying to initially get gradle working, I added touch ~/.gradle/gradle.properties
and specified org.gradle.java.home=/Library/Java/JavaVirtualMachines/jdk-12.jdk/Contents/Home
. Typing /usr/libexec/java_home -V
you will get a list of your Java versions, so in my local gradle.properties
, I had to specify a Java version less than 11 (it ended up being open adoptopenjdk-8.jdk
). To see Java versions, type brew search java
, and then brew cask install <desired java version>
(for mac users).