我构建了一个我在nexus存储库上部署的库.此快照经常更改,因此并非每个更改都会获得新版本号.我的问题是,如果不更改使用此库的项目中的版本号,我就不会获得最新的代码.我尝试了"--refresh-dependencies",我还试图通过在"\ caches\modules-2\files-2.1\my.dependency"下删除此依赖项的文件夹来清除缓存中的依赖项.
我也试过这个:
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
Run Code Online (Sandbox Code Playgroud)
有没有人知道我怎么能强制等级下载依赖的最新状态,尽管版本号没有改变?
当我运行我的 gradle 脚本时,它总是这样做:
> Configure project :
Evaluating root project 'trading-library' using build file 'C:\Users\xxx\Documents\Repositories\Trading_Library\Trading_Library\build.gradle'.
Invalidating in-memory cache of C:\Users\xxx\.gradle\caches\journal-1\file-access.bin
All projects evaluated.
Selected primary task 'cleanTest' from project :
Selected primary task 'test' from project :
Tasks to be executed: [task ':cleanTest', task ':compileJava', task ':processResources', task ':classes', task ':compileTestJava', task ':processTestResources', task ':testClasses', task ':test']
:cleanTest (Thread[Execution worker for ':',5,main]) started.
> Task :cleanTest UP-TO-DATE
Task ':cleanTest' is not up-to-date because:
Task has not declared any outputs despite …Run Code Online (Sandbox Code Playgroud)