Fix null safety of Gradle Kotlin scripts with Gradle 9

See gh-46923
This commit is contained in:
Andy Wilkinson
2025-08-20 12:32:10 +01:00
parent d9b05c7108
commit 27c96d9109
2 changed files with 5 additions and 5 deletions
@@ -27,8 +27,8 @@ tasks.named<BootBuildImage>("bootBuildImage") {
tasks.register("bootBuildImageCaches") {
doFirst {
println("buildWorkspace=" + tasks.getByName<BootBuildImage>("bootBuildImage").buildWorkspace.asCache().bind.source)
println("buildCache=" + tasks.getByName<BootBuildImage>("bootBuildImage").buildCache.asCache().bind.source)
println("launchCache=" + tasks.getByName<BootBuildImage>("bootBuildImage").launchCache.asCache().bind.source)
println("buildWorkspace=" + tasks.getByName<BootBuildImage>("bootBuildImage").buildWorkspace.asCache()?.bind?.source)
println("buildCache=" + tasks.getByName<BootBuildImage>("bootBuildImage").buildCache.asCache()?.bind?.source)
println("launchCache=" + tasks.getByName<BootBuildImage>("bootBuildImage").launchCache.asCache()?.bind?.source)
}
}
@@ -22,7 +22,7 @@ tasks.named<BootBuildImage>("bootBuildImage") {
tasks.register("bootBuildImageCaches") {
doFirst {
println("buildCache=" + tasks.getByName<BootBuildImage>("bootBuildImage").buildCache.asCache().volume.name)
println("launchCache=" + tasks.getByName<BootBuildImage>("bootBuildImage").launchCache.asCache().volume.name)
println("buildCache=" + tasks.getByName<BootBuildImage>("bootBuildImage").buildCache.asCache()?.volume?.name)
println("launchCache=" + tasks.getByName<BootBuildImage>("bootBuildImage").launchCache.asCache()?.volume?.name)
}
}