From bd088fa7e29ba8078d12b96033c780b656ef531d Mon Sep 17 00:00:00 2001 From: Davide Pianca Date: Tue, 23 Apr 2024 22:09:01 +0200 Subject: [PATCH] Fix gradle warning during signing tasks --- kmqtt-broker/build.gradle.kts | 7 +++++++ kmqtt-client/build.gradle.kts | 7 +++++++ kmqtt-common/build.gradle.kts | 7 +++++++ 3 files changed, 21 insertions(+) diff --git a/kmqtt-broker/build.gradle.kts b/kmqtt-broker/build.gradle.kts index 824d1d5..55bcf67 100644 --- a/kmqtt-broker/build.gradle.kts +++ b/kmqtt-broker/build.gradle.kts @@ -133,6 +133,13 @@ tasks { } } +// Fix Gradle warning about signing tasks using publishing task outputs without explicit dependencies +// https://github.com/gradle/gradle/issues/26091 +tasks.withType().configureEach { + val signingTasks = tasks.withType() + mustRunAfter(signingTasks) +} + publishing { repositories { maven { diff --git a/kmqtt-client/build.gradle.kts b/kmqtt-client/build.gradle.kts index 0ac9bc1..8d7cae4 100644 --- a/kmqtt-client/build.gradle.kts +++ b/kmqtt-client/build.gradle.kts @@ -123,6 +123,13 @@ kotlin { } } +// Fix Gradle warning about signing tasks using publishing task outputs without explicit dependencies +// https://github.com/gradle/gradle/issues/26091 +tasks.withType().configureEach { + val signingTasks = tasks.withType() + mustRunAfter(signingTasks) +} + publishing { repositories { maven { diff --git a/kmqtt-common/build.gradle.kts b/kmqtt-common/build.gradle.kts index d2ea486..fcb6159 100644 --- a/kmqtt-common/build.gradle.kts +++ b/kmqtt-common/build.gradle.kts @@ -163,6 +163,13 @@ kotlin { } } +// Fix Gradle warning about signing tasks using publishing task outputs without explicit dependencies +// https://github.com/gradle/gradle/issues/26091 +tasks.withType().configureEach { + val signingTasks = tasks.withType() + mustRunAfter(signingTasks) +} + publishing { repositories { maven {