Skip to content

Commit

Permalink
Make resolveAndLockAll compatible with --update-locks
Browse files Browse the repository at this point in the history
resolves gh-2781
  • Loading branch information
jonatan-ivanov committed Sep 15, 2021
1 parent 19e6bc6 commit 1507d69
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -229,13 +229,12 @@ subprojects {

tasks.register('resolveAndLockAll') {
description = 'Resolves dependencies of all configurations and writes them into the lock file.'
outputs.upToDateWhen { false }
doFirst {
assert gradle.startParameter.writeDependencyLocks : 'Execute resolveAndLockAll --write-locks'
assert gradle.startParameter.writeDependencyLocks || gradle.startParameter.lockedDependenciesToUpdate : 'Execute resolveAndLockAll --write-locks or --update-locks <dependencies>'
}
doLast {
project.configurations
.findAll { it.canBeResolved }
.each { it.resolve() }
project.configurations.findAll { it.canBeResolved }*.resolve()
}
}

Expand Down

0 comments on commit 1507d69

Please sign in to comment.