6

Gradle7.X Snapshot 不刷新问题

 2 years ago
source link: http://i.lckiss.com/?p=7371
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Gradle7.X Snapshot 不刷新问题

2021-08-03

Gradle 默认不会每次都去更新 snapshot 版本的依赖,需要在用到 snapshot 依赖的 module 的 build.gradle 后面追加相关配置,类似:

plugins {
    id 'java' // so that there are some configurations
}

configurations.all {
  resolutionStrategy {
    // don't cache changing modules at all
    cacheChangingModulesFor 0, 'seconds'
  }
}

测试可行,以上。

详细信息可参考官方文档:https://docs.gradle.org/current/dsl/org.gradle.api.artifacts.ResolutionStrategy.html


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK