diff --git a/tooling/hibernate-gradle-plugin/hibernate-gradle-plugin.gradle b/tooling/hibernate-gradle-plugin/hibernate-gradle-plugin.gradle index 4889a77bdb9d..905961b4fe0f 100644 --- a/tooling/hibernate-gradle-plugin/hibernate-gradle-plugin.gradle +++ b/tooling/hibernate-gradle-plugin/hibernate-gradle-plugin.gradle @@ -178,12 +178,12 @@ gradle.taskGraph.whenReady { tg -> // and then the `gradle.publish.key` / `gradle.publish.secret` combo (project prop) // - see https://docs.gradle.org/current/userguide/publishing_gradle_plugins.html#account_setup if ( System.getenv().get("GRADLE_PUBLISH_KEY") != null ) { - if ( System.getenv().get("GRADLE_PUBLISH_SECRET") != null ) { + if ( System.getenv().get("GRADLE_PUBLISH_SECRET") == null ) { throw new RuntimeException( "`GRADLE_PUBLISH_KEY` specified, but not `GRADLE_PUBLISH_SECRET` for publishing Gradle plugin" ) } } else if ( project.findProperty( 'gradle.publish.key' ) != null ) { - if ( project.findProperty( 'gradle.publish.secret' ) != null ) { + if ( project.findProperty( 'gradle.publish.secret' ) == null ) { throw new RuntimeException( "`gradle.publish.key` specified, but not `gradle.publish.secret` for publishing Gradle plugin" ) } }