Skip to content

Instantly share code, notes, and snippets.

@mingliangguo
Last active February 16, 2017 17:34
Show Gist options
  • Select an option

  • Save mingliangguo/9bccfbb6af837fbb9cb46d6f7d74abff to your computer and use it in GitHub Desktop.

Select an option

Save mingliangguo/9bccfbb6af837fbb9cb46d6f7d74abff to your computer and use it in GitHub Desktop.
gradle recipe
# 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