From 5ae9e9fb7e6e82c42cb073491f702086f94ec798 Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Tue, 18 May 2021 14:58:16 -0500 Subject: [PATCH] prepare for 6.0.0.Alpha8 --- .../hibernate-gradle-plugin.gradle | 39 ++++++------------- 1 file changed, 11 insertions(+), 28 deletions(-) diff --git a/tooling/hibernate-gradle-plugin/hibernate-gradle-plugin.gradle b/tooling/hibernate-gradle-plugin/hibernate-gradle-plugin.gradle index 756819fcb0..62a62f021e 100644 --- a/tooling/hibernate-gradle-plugin/hibernate-gradle-plugin.gradle +++ b/tooling/hibernate-gradle-plugin/hibernate-gradle-plugin.gradle @@ -76,34 +76,6 @@ processResources { } -if ( project.version.toString().endsWith( '-SNAPSHOT' ) ) { - tasks.publishPlugins.enabled = false - tasks.release.dependsOn tasks.publish -} -else { - tasks.publish.enabled = false - tasks.release.dependsOn( tasks.publishPlugins ) -} - -tasks.publishPlugins { - doFirst { - if ( credentials.hibernatePluginPortalUsername == null ) { - throw new RuntimeException( "`hibernatePluginPortalUsername` not found" ) - } - if ( credentials.hibernatePluginPortalPassword == null ) { - throw new RuntimeException( "`hibernatePluginPortalPassword` not found" ) - } - } -} - -publishing { - publications { - plugin( MavenPublication ) { - from components.java - } - } -} - tasks.withType( GroovyCompile ) { options.encoding = 'UTF-8' } @@ -125,3 +97,14 @@ tasks.test { jvmArgs( ['--add-opens', 'java.base/java.lang=ALL-UNNAMED'] ) } } + +gradle.taskGraph.whenReady { tg -> + if ( tg.hasTask( project.tasks.publishPlugins ) ) { + if ( credentials.hibernatePluginPortalUsername == null ) { + throw new RuntimeException( "`hibernatePluginPortalUsername` not found" ) + } + if ( credentials.hibernatePluginPortalPassword == null ) { + throw new RuntimeException( "`hibernatePluginPortalPassword` not found" ) + } + } +} \ No newline at end of file