How to control directory for initializing native service on Windows

(Gary Price) #1

I am working with Gradle 3.5 on Windows 7, in the MINGW64 Git Bash shell. A directory called c:Usersgbpricegradle-temp is created when Gradle runs. It contains some native DLLs, includingjansi.dll. The name suggests Gradle is deriving the name of this directory from my Gradle User Home. I have GRADLE_USER_HOME set to what looks like a correct value in the Windows environment for my username. I have tried setting gradle.user.home in my Gradle user properties file, without success. I tried setting -Dlibrary.jansi.path=something else on the Gradle command line, and also setting DEFAULT_JVM_OPTS to contain the same system property definition. How can I put this directory in my GRADLE_USER_HOME directory? Or is it being created because of some problem Gradle detects with putting it there?

Some debug output:

08:47:15.422 [INFO] [] Initialized native services in: c:Usersgbpricegradle-temp
08:47:15.441 [DEBUG] [] Native-platform posix files integration is not available. Continuing with fallback.

(Gary Price) #2

I discovered that this was happening because GRADLE_OPTS in the Windows environment included a setting for org.gradle.native.dir with backslashes. Fixed.