Skip to content

Commit 96eece6

Browse files
committed
Fix Gradle plugin publishing credentials check
1 parent 85800a9 commit 96eece6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tooling/hibernate-gradle-plugin/hibernate-gradle-plugin.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,12 @@ gradle.taskGraph.whenReady { tg ->
141141
// and then the `gradle.publish.key` / `gradle.publish.secret` combo (project prop)
142142
// - see https://docs.gradle.org/current/userguide/publishing_gradle_plugins.html#account_setup
143143
if ( System.getenv().get("GRADLE_PUBLISH_KEY") != null ) {
144-
if ( System.getenv().get("GRADLE_PUBLISH_SECRET") != null ) {
144+
if ( System.getenv().get("GRADLE_PUBLISH_SECRET") == null ) {
145145
throw new RuntimeException( "`GRADLE_PUBLISH_KEY` specified, but not `GRADLE_PUBLISH_SECRET` for publishing Gradle plugin" )
146146
}
147147
}
148148
else if ( project.findProperty( 'gradle.publish.key' ) != null ) {
149-
if ( project.findProperty( 'gradle.publish.secret' ) != null ) {
149+
if ( project.findProperty( 'gradle.publish.secret' ) == null ) {
150150
throw new RuntimeException( "`gradle.publish.key` specified, but not `gradle.publish.secret` for publishing Gradle plugin" )
151151
}
152152
}

0 commit comments

Comments
 (0)