Android gradle project directory variable

I am trying to write a script in gradle that requires opening a file. I am trying to find the current directory in which the project is installed. so I can open the file in my "raw" directory.

Note. I know that I can use a temporary file to find the current location of the application. However, I try to stay away from this decision.

I am trying to find out if there is a gradle buildDir variable that I can use in my task.

+4
source share
1 answer

See Gradle docs . In particular, you are interested in projectDir(the directory containing the script construct) or buildDir(projectDir / build).

+9

Source: https://habr.com/ru/post/1547424/


All Articles