Improved Gradle Plugin Portal auth handling

This commit is contained in:
Steve Ebersole 2021-05-23 22:17:42 -05:00
parent 2e875f9b8a
commit 80801d27bb
1 changed files with 7 additions and 1 deletions

View File

@ -22,13 +22,19 @@ ext {
pluginId = 'org.hibernate.orm' pluginId = 'org.hibernate.orm'
pluginVersion = project.version pluginVersion = project.version
// look for command-line overrides of the username/password pairs for publishing
if ( project.hasProperty( 'hibernatePluginPortalUsername' ) ) { if ( project.hasProperty( 'hibernatePluginPortalUsername' ) ) {
credentials.hibernatePluginPortalUsername = project.property( 'hibernatePluginPortalUsername' ) credentials.hibernatePluginPortalUsername = project.property( 'hibernatePluginPortalUsername' )
} }
if ( credentials.hibernatePluginPortalUsername != null ) {
project.setProperty( 'gradle.publish.key', credentials.hibernatePluginPortalUsername )
}
if ( project.hasProperty( 'hibernatePluginPortalPassword' ) ) { if ( project.hasProperty( 'hibernatePluginPortalPassword' ) ) {
credentials.hibernatePluginPortalPassword = project.property( 'hibernatePluginPortalPassword' ) credentials.hibernatePluginPortalPassword = project.property( 'hibernatePluginPortalPassword' )
} }
if ( credentials.hibernatePluginPortalPassword != null ) {
project.setProperty( 'gradle.publish.secret', credentials.hibernatePluginPortalPassword )
}
} }
dependencies { dependencies {