HHH-15534 Fix publishing of the hibernate-gradle-plugin

This commit is contained in:
Christian Beikov 2022-09-23 10:56:58 +02:00
parent f935eb2430
commit 249dfd0d12
2 changed files with 6 additions and 4 deletions

View File

@ -11,6 +11,7 @@ apply from: rootProject.file( 'gradle/publishing-pom.gradle' )
apply plugin: 'signing'
// Make sure that the publishReleaseArtifacts task of the release module runs the release task of this sub module
tasks.getByPath( ':release:publishReleaseArtifacts' ).dependsOn tasks.release
configurations {

View File

@ -87,6 +87,9 @@ tasks.release.dependsOn tasks.publishPlugins
// local publishing (SNAPSHOT testing)
tasks.publish.dependsOn tasks.publishPlugins
// Make sure that the publishReleaseArtifacts task of the release module runs the release task of this sub module
tasks.getByPath( ':release:publishReleaseArtifacts' ).dependsOn tasks.release
// local publishing (SNAPSHOT testing)
publishing {
repositories {
@ -145,10 +148,8 @@ tasks.publishPlugins.enabled !project.ormVersion.isSnapshot
gradle.taskGraph.whenReady { tg ->
if ( tg.hasTask( project.tasks.publishPlugins ) && project.tasks.publishPlugins.enabled ) {
// look for sys-prop or env-var overrides of the tokens used for publishing
if ( System.properties.containsKey( 'gradle.publish.key' )
|| System.properties.containsKey( 'gradle.publish.secret' )
|| System.getenv().containsKey( 'GRADLE_PUBLISH_KEY' )
|| System.getenv().containsKey( 'GRADLE_PUBLISH_SECRET' ) ) {
if ( project.properties.containsKey( 'gradle.publish.key' )
|| project.properties.containsKey( 'gradle.publish.secret' ) ) {
// nothing to do - already explicitly set
}
else {