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()) } }