From 7cae8e9a7ba3401a51e60132ed9f8dd59472630f Mon Sep 17 00:00:00 2001 From: Joshua Barr <70981087+jobarr-amzn@users.noreply.github.com> Date: Wed, 19 Apr 2023 21:27:02 -0700 Subject: [PATCH] Fix signing task `onlyIf` restriction (#483) The argument to `hasTask` must be provided as either an instance of `Task` or a `String` representing the absolute task path. The absolute task path for the project root publish task is `:publish`. --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 7ad530ffed..6a637759a2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -166,7 +166,7 @@ tasks { } withType { - setOnlyIf { isReleaseVersion && gradle.taskGraph.hasTask("publish") } + setOnlyIf { isReleaseVersion && gradle.taskGraph.hasTask(":publish") } } cyclonedxBom {