gpt4 book ai didi

gradle - 设置 Gradle 缓存目录?

转载 作者:行者123 更新时间:2023-12-02 11:42:54 25 4
gpt4 key购买 nike

是否可以设置 Gradle 缓存目录,而无需设置 GRADLE_USER_HOME 环境变量?我希望 Gradle 缓存与我的代码存在于同一工作区中,但这似乎只有通过包含 Gradle 的 bash 脚本才能实现。

为了澄清,我正在讨论包含已解析依赖文件的 Gradle 缓存。

最佳答案

我认为这可能对您有用 - Appendix D. Gradle Command Line

--project-cache-dir

Specifies the project-specific cache directory. Default value is .gradle in the root project directory.

--gradle-user-home

Specifies the Gradle user home directory. The default is the .gradle directory in the user's home directory

它的实际应用片段 - 刚刚在本地测试:

C:\dev\ws\NYSSIS-Intellij\ear>gradle --gradle-user-home c:\dev\cache-test build
Build initialized to use p12_2014_03_31e-windows-models.jar for ChoiceMaker model
:compileJava UP-TO-DATE
:compileGroovy UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:web:compileJava UP-TO-DATE
:web:compileGroovy
Download https://repo1.maven.org/maven2/org/codehaus/groovy/groovy-all/2.4.6/groovy-all-2.4.6.pom
Download https://repo1.maven.org/maven2/org/springframework/spring-webmvc/3.2.15.RELEASE/spring-webmvc-3.2.15.RELEASE.pom
Download https://repo1.maven.org/maven2/org/springframework/spring-jdbc/3.2.15.RELEASE/spring-jdbc-3.2.15.RELEASE.pom
Download https://repo1.maven.org/maven2/org/springframework/spring-context-support/3.2.15.RELEASE/spring-context-support-3.2.15.RELEASE.pom

关于gradle - 设置 Gradle 缓存目录?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38575542/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com