@@ -62,18 +62,18 @@ task publish {
6262}
6363
6464ext {
65- if ( project. hasProperty( ' hibernatePublishUsername ' ) ) {
66- if ( ! project. hasProperty( ' hibernatePublishPassword ' ) ) {
67- throw new GradleException ( " Should specify both `hibernatePublishUsername ` and `hibernatePublishPassword ` as project properties" );
65+ if ( project. hasProperty( ' OSSRH_USER ' ) ) {
66+ if ( ! project. hasProperty( ' OSSRH_PASSWORD ' ) ) {
67+ throw new GradleException ( " Should specify both `OSSRH_USER ` and `OSSRH_PASSWORD ` as project properties" );
6868 }
6969 }
7070}
7171
7272nexusPublishing {
7373 repositories {
7474 sonatype {
75- username = project. hasProperty( ' hibernatePublishUsername ' ) ? project. property( ' hibernatePublishUsername ' ) : null
76- password = project. hasProperty( ' hibernatePublishPassword ' ) ? project. property( ' hibernatePublishPassword ' ) : null
75+ username = project. hasProperty( ' OSSRH_USER ' ) ? project. property( ' OSSRH_USER ' ) : null
76+ password = project. hasProperty( ' OSSRH_PASSWORD ' ) ? project. property( ' OSSRH_PASSWORD ' ) : null
7777 }
7878 }
7979}
@@ -94,11 +94,11 @@ gradle.taskGraph.addTaskExecutionGraphListener(
9494 if ( graph. hasTask( taskToLookFor ) ) {
9595 // trying to publish - make sure the needed credentials are available
9696
97- if ( project. property( ' hibernatePublishUsername ' ) == null ) {
98- throw new RuntimeException ( " `-PhibernatePublishUsername =...` not found" )
97+ if ( project. property( ' OSSRH_USER ' ) == null ) {
98+ throw new RuntimeException ( " `-POSSRH_USER =...` not found" )
9999 }
100- if ( project. property( ' hibernatePublishPassword ' ) == null ) {
101- throw new RuntimeException ( " `-PhibernatePublishPassword =...` not found" )
100+ if ( project. property( ' OSSRH_PASSWORD ' ) == null ) {
101+ throw new RuntimeException ( " `-POSSRH_PASSWORD =...` not found" )
102102 }
103103
104104 break ;
0 commit comments