From be42a508816a0acc0ec3a7d3ad0ce0620254f5d4 Mon Sep 17 00:00:00 2001 From: Cristian Garcia Date: Tue, 25 Oct 2022 05:20:40 +0200 Subject: [PATCH] fix allureReport tasks execution (via #104) --- .../qameta/allure/gradle/adapter/AllureAdapterExtension.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/allure-adapter-plugin/src/main/kotlin/io/qameta/allure/gradle/adapter/AllureAdapterExtension.kt b/allure-adapter-plugin/src/main/kotlin/io/qameta/allure/gradle/adapter/AllureAdapterExtension.kt index ef49a41..54dc1e5 100644 --- a/allure-adapter-plugin/src/main/kotlin/io/qameta/allure/gradle/adapter/AllureAdapterExtension.kt +++ b/allure-adapter-plugin/src/main/kotlin/io/qameta/allure/gradle/adapter/AllureAdapterExtension.kt @@ -98,7 +98,11 @@ open class AllureAdapterExtension @Inject constructor( fun gatherResultsFrom(tasks: TaskCollection) { project.apply() - tasks.names.onEach { exposeArtifact(tasks.named(it)) } + project.afterEvaluate { + tasks.names.forEach { + exposeArtifact(tasks.named(it)) + } + } tasks.configureEach { internalGatherResultsFrom(this) }