From 9a2433adb5e56034f8a662cef6bc4d5277a7fa3b Mon Sep 17 00:00:00 2001 From: Jovan Stanisic Date: Tue, 20 Aug 2024 15:39:43 +0200 Subject: [PATCH] #271 Replaced single project evaluation block with projectsEvaluated block that waits for all projects and subprojects to get evaluated --- .../module/graph/assertion/ModuleGraphAssertionsPlugin.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugin/src/main/kotlin/com/jraska/module/graph/assertion/ModuleGraphAssertionsPlugin.kt b/plugin/src/main/kotlin/com/jraska/module/graph/assertion/ModuleGraphAssertionsPlugin.kt index ce68b07..a6a3079 100644 --- a/plugin/src/main/kotlin/com/jraska/module/graph/assertion/ModuleGraphAssertionsPlugin.kt +++ b/plugin/src/main/kotlin/com/jraska/module/graph/assertion/ModuleGraphAssertionsPlugin.kt @@ -29,13 +29,11 @@ class ModuleGraphAssertionsPlugin : Plugin { override fun apply(project: Project) { val graphRules = project.extensions.create(GraphRulesExtension::class.java, Api.EXTENSION_ROOT, GraphRulesExtension::class.java) - project.afterEvaluate { + project.gradle.projectsEvaluated { addModulesAssertions(project, graphRules) if (graphRules.assertOnAnyBuild) { - project.gradle.projectsEvaluated { - project.runAssertionsDirectly(graphRules) - } + project.runAssertionsDirectly(graphRules) } } }