comparison init70.gradle @ 313:69213629de0f

update releaselock process to lock all gradle configurations.
author Marc Davis <marc.davis@mcoecn.org>
date Tue, 07 Feb 2023 14:50:26 -0500
parents 95d4eb5bff0f
children de8c350c511a
comparison
equal deleted inserted replaced
298:95d4eb5bff0f 313:69213629de0f
272 description = "Create release dependencies Lock files" 272 description = "Create release dependencies Lock files"
273 doFirst { 273 doFirst {
274 assert gradle.startParameter.writeDependencyLocks : "must include --write-locks or --update-locks option when locking dependencies" 274 assert gradle.startParameter.writeDependencyLocks : "must include --write-locks or --update-locks option when locking dependencies"
275 } 275 }
276 doLast { 276 doLast {
277
278 if (!gradle.branch.isRelease()) { 277 if (!gradle.branch.isRelease()) {
279 throw new BuildCancelledException("releaseLock is only valid on release or hotfix branch.") 278 throw new BuildCancelledException("releaseLock is only valid on release or hotfix branch.")
280 } 279 }
281
282 configurations.findAll { 280 configurations.findAll {
283 it.canBeResolved 281 it.canBeResolved
284 }.findAll { c -> 282 }
285 def n = c.name.toLowerCase() 283 .each {
286 ['compile','runtime','provided'].any { n.contains(it) }
287 }.each {
288 it.resolve() 284 it.resolve()
289 } 285 }
290 } 286 }
291 } 287 }
292 288