From 68ce1608511c0ef7882b2628846543c6c891bac6 Mon Sep 17 00:00:00 2001 From: Rob Rudin Date: Mon, 22 Apr 2019 16:33:23 -0400 Subject: [PATCH] #456 Can now define multiple instances of DeleteCollectionsTask --- .../gradle/task/datamovement/DeleteCollectionsTask.groovy | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/groovy/com/marklogic/gradle/task/datamovement/DeleteCollectionsTask.groovy b/src/main/groovy/com/marklogic/gradle/task/datamovement/DeleteCollectionsTask.groovy index 85e066a9c..35c4a49c2 100644 --- a/src/main/groovy/com/marklogic/gradle/task/datamovement/DeleteCollectionsTask.groovy +++ b/src/main/groovy/com/marklogic/gradle/task/datamovement/DeleteCollectionsTask.groovy @@ -9,9 +9,7 @@ class DeleteCollectionsTask extends DataMovementTask { @TaskAction void deleteCollections() { - if (collections != null && collections.length > 0) { - getProject().getExtensions().add("collections", collections.join(",")) - } + project.ext.collections = (collections != null && collections.length > 0) ? collections.join(",") : null runQueryBatcherJob(new DeleteCollectionsJob()) } }