一般在开发模式下,我们可以频繁的发布SNAPSHOT版本,以便让其它项目能实时的使用到最新的功能做联调;当版本趋于稳定时,再发布一个正式版本,供正式使用。SNAPSHOT版本可能会频繁更新但是版本号是不变的,需要取消缓存策略。
设置本地缓存的更新策略:
configurations.all {
// check for updates every build
resolutionStrategy.cacheChangingModulesFor 0,'seconds'
// check for 10 minutes time
resolutionStrategy.cacheChangingModulesFor 10, ‘minutes'
}设置更新依赖文件:
compile("com.***.***:***-android-lib:1.7.6-SNAPSHOT") {
changing = true
}