Change Gradle's working directory when compiling a Groovy project

后端 未结 3 1492
迷失自我
迷失自我 2021-01-01 16:48

When compiling a groovy project, gradle creates files in $projectRoot/build/. Is there a way to configure this to e.g. an absolute path?

3条回答
  •  没有蜡笔的小新
    2021-01-01 17:33

    Yes, there is. You can put the following line in your build script:

    buildDir = 'your_directory'
    

    Or in gradle.properties file (no quotes around your_directory in that case).


    Build directory is a project property. You can view all project properties available to you by typing:

    gradle properties
    

提交回复
热议问题