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

来源:互联网 发布:java面向对象练习题 编辑:程序博客网 时间:2024/05/21 18:36

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'}
1 0
原创粉丝点击