您的位置:首页 > 其它

Gradle如何始终使用最新版本的依赖

2016-01-29 16:56 471 查看
By default, Gradle treats a module version (eg "myorg:myproj:1.0") as unchanging over time, allowing us to cache the module meta-data and artifacts indefinitely. If you have a module version that has content (meta-data or artifacts) that can change over time,
you can mark the module as 'changing'.

dependencies {
compile group: "group", name: "projectA", version: "1.1", changing: true
}


Normally, Gradle will still cache changing modules for a 24 hour period. You can configure this cache timeout using something like:

configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: