Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle user home

Is there a way to access the gradle user home directory which could be set by GRADLE_USER_HOME or -g somedir or the default value from within my build.gradle file?

If I run a gradle build with --debug it prints out the user home but I can't find a way to access it by any variable.

example printout:
[DEBUG] [org.gradle.BuildLogger] Gradle user home: /some/dir

like image 644
ki_ Avatar asked Dec 06 '22 17:12

ki_


1 Answers

In you gradle build script you can access it via:

project.gradle.gradleUserHomeDir

See here for more details

like image 128
Nikem Avatar answered Jan 25 '23 21:01

Nikem