HHH-14513 Move publishing release artifacts from BinTray

This commit is contained in:
Andrea Boriero 2021-04-29 11:05:55 +02:00
parent cb1c87aa29
commit 9921a06d03
4 changed files with 27 additions and 47 deletions

View File

@ -15,18 +15,38 @@ buildscript {
classpath 'org.hibernate.build.gradle:version-injection-plugin:1.0.0'
classpath 'gradle.plugin.com.github.lburgazzoli:gradle-karaf-plugin:0.5.1'
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.7'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'de.thetaphi:forbiddenapis:3.0.1'
}
}
plugins {
id 'me.champeau.buildscan-recipes' version '0.2.3'
id 'io.github.gradle-nexus.publish-plugin' version '1.0.0'
id 'nu.studer.credentials' version '2.1' apply false
id 'org.hibernate.build.xjc' version '2.0.1' apply false
id 'org.hibernate.build.maven-repo-auth' version '3.0.3' apply false
id 'biz.aQute.bnd' version '5.1.1' apply false
}
ext {
sonatypeOssrhUser = project.findProperty( 'SONATYPE_OSSRH_USER' )
sonatypeOssrhPassword = project.findProperty( 'SONATYPE_OSSRH_PASSWORD' )
}
// nexusPublishing uses group and version
// as defaults
group = project.group
version = project.version
nexusPublishing {
repositories {
sonatype {
username = project.sonatypeOssrhUser
password = project.sonatypeOssrhPassword
}
}
}
allprojects {
repositories {
mavenCentral()
@ -40,6 +60,9 @@ allprojects {
}
apply plugin: 'idea'
group = project.group
version = project.version
// minimize changes, at least for now (gradle uses 'build' by default)..
buildDir = "target"

View File

@ -165,6 +165,6 @@ publishing {
task ciBuild( dependsOn: [test, publish] )
task release( dependsOn: [test, bintrayUpload] )
bintrayUpload.mustRunAfter test
task release( dependsOn: [test, publishToSonatype] )
publishToSonatype.mustRunAfter test

View File

@ -10,16 +10,6 @@ apply from: rootProject.file( 'gradle/base-information.gradle' )
apply plugin: 'maven-publish'
apply plugin: 'org.hibernate.build.maven-repo-auth'
apply plugin: 'com.jfrog.bintray'
ext {
bintrayUser = project.findProperty( 'PERSONAL_BINTRAY_USER' )
bintrayKey = project.findProperty( 'PERSONAL_BINTRAY_API_KEY' )
sonatypeOssrhUser = project.findProperty( 'SONATYPE_OSSRH_USER' )
sonatypeOssrhPassword = project.findProperty( 'SONATYPE_OSSRH_PASSWORD' )
}
publishing {
publications {
@ -34,39 +24,6 @@ publishing {
}
}
bintray {
user = project.bintrayUser
key = project.bintrayKey
publications = ['publishedArtifacts']
pkg {
userOrg = 'hibernate'
repo = 'artifacts'
name = 'hibernate-orm'
publish = true
version {
name = project.version
released = new Date()
vcsTag = project.version
gpg {
sign = true
}
attributes = [
'jpa': project.jpaVersion,
'family': project.ormVersion.family
]
mavenCentralSync {
sync = true
user = project.sonatypeOssrhUser
password = project.sonatypeOssrhPassword
}
}
}
}
model {
tasks.generatePomFileForPublishedArtifactsPublication {
destination = file( "${buildDir}/generated-pom.xml" )

View File

@ -32,4 +32,4 @@ publishing {
}
}
task release( dependsOn: bintrayUpload )
task release( dependsOn: publishToSonatype )