diff --git a/build.gradle b/build.gradle index 3dfb6227e9..15fb87227b 100644 --- a/build.gradle +++ b/build.gradle @@ -70,8 +70,8 @@ ext { nexusPublishing { repositories { sonatype { - username = project.property( 'hibernatePublishUsername' ) - password = project.property( 'hibernatePublishPassword' ) + username = project.hasProperty( 'hibernatePublishUsername' ) ? project.property( 'hibernatePublishUsername' ) : null + password = project.hasProperty( 'hibernatePublishPassword' ) ? project.property( 'hibernatePublishPassword' ) : null } } }