Skip to content

Commit 092a767

Browse files
committed
Fix Gradle plugin publishing credentials check
1 parent e44a8c2 commit 092a767

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
@@ -178,12 +178,12 @@ gradle.taskGraph.whenReady { tg ->
178178
// and then the `gradle.publish.key` / `gradle.publish.secret` combo (project prop)
179179
//- see https://docs.gradle.org/current/userguide/publishing_gradle_plugins.html#account_setup
180180
if ( System.getenv().get("GRADLE_PUBLISH_KEY") != null ) {
181-
if ( System.getenv().get("GRADLE_PUBLISH_SECRET") != null ) {
181+
if ( System.getenv().get("GRADLE_PUBLISH_SECRET") == null ) {
182182
throw new RuntimeException( "`GRADLE_PUBLISH_KEY` specified, but not `GRADLE_PUBLISH_SECRET` for publishing Gradle plugin" )
183183
}
184184
}
185185
else if ( project.findProperty( 'gradle.publish.key' ) != null ) {
186-
if ( project.findProperty( 'gradle.publish.secret' ) != null ) {
186+
if ( project.findProperty( 'gradle.publish.secret' ) == null ) {
187187
throw new RuntimeException( "`gradle.publish.key` specified, but not `gradle.publish.secret` for publishing Gradle plugin" )
188188
}
189189
}

0 commit comments

Comments
 (0)