From 49e343e08ee9213f7e50f0b0a156f2399127ac76 Mon Sep 17 00:00:00 2001 From: Anastasiia Spaseeva Date: Wed, 27 Jul 2022 13:58:40 +0200 Subject: [PATCH] Fix condition for execution of prepareSonatypeStaging script. This fixes a publication to maven central problem after commit cf2d03b9 --- build.gradle.kts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 5e0cc7abe85..c47f71eb9f6 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -526,10 +526,13 @@ allprojects { apply { from("libraries/commonConfiguration.gradle") - if (extra.has("isDeployStagingRepoGenerationRequired") && project.extra["isDeployStagingRepoGenerationRequired"] as Boolean) { - logger.info("Applying configuration for sonatype release") - from("libraries/prepareSonatypeStaging.gradle") - } +} + +if (extra.has("isDeployStagingRepoGenerationRequired") && + project.extra["isDeployStagingRepoGenerationRequired"] as Boolean == true +) { + logger.info("Applying configuration for sonatype release") + project.apply { from("libraries/prepareSonatypeStaging.gradle") } } gradle.taskGraph.whenReady {