From bc5b866c8602e13947d5e18500c274b0f3fe0b49 Mon Sep 17 00:00:00 2001 From: Christian Beikov Date: Tue, 30 Aug 2022 18:20:24 +0200 Subject: [PATCH] HHH-15381 Try to fix gradle plugin publishing and platform publishing --- hibernate-platform/hibernate-platform.gradle | 1 + .../hibernate-gradle-plugin.gradle | 10 ++-------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/hibernate-platform/hibernate-platform.gradle b/hibernate-platform/hibernate-platform.gradle index f9d8ef17f6..d60cbd8465 100644 --- a/hibernate-platform/hibernate-platform.gradle +++ b/hibernate-platform/hibernate-platform.gradle @@ -2,6 +2,7 @@ plugins { id 'java-platform' } +apply from: rootProject.file( 'gradle/releasable.gradle' ) apply from: rootProject.file( "gradle/base-information.gradle" ) apply from: rootProject.file( "gradle/publishing-pom.gradle" ) diff --git a/tooling/hibernate-gradle-plugin/hibernate-gradle-plugin.gradle b/tooling/hibernate-gradle-plugin/hibernate-gradle-plugin.gradle index bd5df2be50..9a24780bcd 100644 --- a/tooling/hibernate-gradle-plugin/hibernate-gradle-plugin.gradle +++ b/tooling/hibernate-gradle-plugin/hibernate-gradle-plugin.gradle @@ -139,14 +139,8 @@ checkstyle { showViolations = false } - -afterEvaluate { - if ( project.ormVersion.isSnapshot ) { - release.enabled false - publish.enabled false - publishPlugins.enabled false - } -} +tasks.publish.enabled !project.ormVersion.isSnapshot +tasks.publishPlugins.enabled !project.ormVersion.isSnapshot gradle.taskGraph.whenReady { tg -> if ( tg.hasTask( project.tasks.publishPlugins ) && project.tasks.publishPlugins.enabled ) {