From a1b4773496b7fda86869ff527f475442d151737a Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Tue, 3 Dec 2024 22:29:47 -0600 Subject: [PATCH] fix release publishing --- build.gradle | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index 600efa2789..070e16c661 100644 --- a/build.gradle +++ b/build.gradle @@ -62,9 +62,9 @@ task publish { } ext { - if ( project.hasProperty( 'hibernatePublishUsername' ) ) { - if ( ! project.hasProperty( 'hibernatePublishPassword' ) ) { - throw new GradleException( "Should specify both `hibernatePublishUsername` and `hibernatePublishPassword` as project properties" ); + if ( project.hasProperty( 'OSSRH_USER' ) ) { + if ( ! project.hasProperty( 'OSSRH_PASSWORD' ) ) { + throw new GradleException( "Should specify both `OSSRH_USER` and `OSSRH_PASSWORD` as project properties" ); } } } @@ -72,8 +72,8 @@ ext { nexusPublishing { repositories { sonatype { - username = project.hasProperty( 'hibernatePublishUsername' ) ? project.property( 'hibernatePublishUsername' ) : null - password = project.hasProperty( 'hibernatePublishPassword' ) ? project.property( 'hibernatePublishPassword' ) : null + username = project.hasProperty( 'OSSRH_USER' ) ? project.property( 'OSSRH_USER' ) : null + password = project.hasProperty( 'OSSRH_PASSWORD' ) ? project.property( 'OSSRH_PASSWORD' ) : null } } } @@ -94,11 +94,11 @@ gradle.taskGraph.addTaskExecutionGraphListener( if ( graph.hasTask( taskToLookFor ) ) { // trying to publish - make sure the needed credentials are available - if ( project.property( 'hibernatePublishUsername' ) == null ) { - throw new RuntimeException( "`-PhibernatePublishUsername=...` not found" ) + if ( project.property( 'OSSRH_USER' ) == null ) { + throw new RuntimeException( "`-POSSRH_USER=...` not found" ) } - if ( project.property( 'hibernatePublishPassword' ) == null ) { - throw new RuntimeException( "`-PhibernatePublishPassword=...` not found" ) + if ( project.property( 'OSSRH_PASSWORD' ) == null ) { + throw new RuntimeException( "`-POSSRH_PASSWORD=...` not found" ) } break;