Last active
February 16, 2017 17:34
-
-
Save mingliangguo/9bccfbb6af837fbb9cb46d6f7d74abff to your computer and use it in GitHub Desktop.
gradle recipe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # You can tell Gradle to re-download some dependencies in the build script by flagging the dependency as 'changing'. Gradle will then check for updates every 24 hours, but this can be configured using the resolutionStrategy DSL. I find it useful to use this for for SNAPSHOT or NIGHTLY builds. | |
| # refer to [link](http://stackoverflow.com/questions/13565082/how-can-i-force-gradle-to-redownload-dependencies) | |
| # https://docs.gradle.org/current/dsl/org.gradle.api.artifacts.ResolutionStrategy.html | |
| configurations.all { | |
| // Check for updates every build | |
| resolutionStrategy.cacheChangingModulesFor 0, 'seconds' | |
| } | |
| dependencies { | |
| compile group: "group", name: "projectA", version: "1.1-SNAPSHOT", changing: true | |
| } | |
| compile('group:projectA:1.1-SNAPSHOT') { changing = true } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment