From 3f83fdbfc169e5f49bde36700d4ae4d2ff52797f Mon Sep 17 00:00:00 2001 From: Andrew Grieve Date: Wed, 17 Sep 2014 21:27:06 -0400 Subject: [PATCH] CB-7512 Fix gradle asking for release password when building for debug --- bin/templates/project/build.gradle | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/templates/project/build.gradle b/bin/templates/project/build.gradle index b6994b64..6de8c547 100644 --- a/bin/templates/project/build.gradle +++ b/bin/templates/project/build.gradle @@ -140,7 +140,7 @@ def promptForPassword(msg) { } } -task promptForReleaseKeyPassword { +def promptForReleaseKeyPassword() { if (!System.env.RELEASE_SIGNING_PROPERTIES_FILE) { return; } @@ -153,9 +153,11 @@ task promptForReleaseKeyPassword { } } -tasks.whenTaskAdded { task -> - if (task.name == 'validateReleaseSigning') { - task.dependsOn promptForReleaseKeyPassword +gradle.taskGraph.whenReady { taskGraph -> + taskGraph.getAllTasks().each() { task -> + if (task.name == 'validateReleaseSigning') { + promptForReleaseKeyPassword() + } } }