add new task to update gradle lockfiles, and update lockfiles
This commit is contained in:
parent
b6fbea813b
commit
05ee976d13
4 changed files with 35 additions and 29 deletions
|
@ -21,3 +21,16 @@ dependencyLocking {
|
|||
lockMode.set(LockMode.STRICT)
|
||||
lockAllConfigurations()
|
||||
}
|
||||
|
||||
tasks.register("resolveAndLockAllDependencies") {
|
||||
// https://docs.gradle.org/current/userguide/dependency_locking.html#ex-resolving-all-configurations
|
||||
group = "dependencies"
|
||||
notCompatibleWithConfigurationCache("Filters configurations at execution time")
|
||||
val resolvableConfigurations = configurations.matching { it.isCanBeResolved }
|
||||
doFirst {
|
||||
require(gradle.startParameter.isWriteDependencyLocks) { "$path must be run from the command line with the `--write-locks` flag" }
|
||||
}
|
||||
doLast {
|
||||
resolvableConfigurations.forEach { it.resolve() }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue