5.3 beta2
This commit is contained in:
parent
21794a29fc
commit
f28e037a58
|
@ -7,12 +7,11 @@
|
|||
|
||||
apply from: rootProject.file( 'gradle/java-module.gradle' )
|
||||
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
apply from: rootProject.file( 'gradle/publishing-pom.gradle' )
|
||||
apply from: rootProject.file( 'gradle/publishing-repos.gradle' )
|
||||
|
||||
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Jar
|
||||
|
||||
|
@ -121,7 +120,7 @@ javadoc {
|
|||
|
||||
publishing {
|
||||
publications {
|
||||
publishedArtifacts( MavenPublication ) {
|
||||
publishedArtifacts {
|
||||
from components.java
|
||||
|
||||
artifact( sourcesJar ) {
|
||||
|
@ -137,19 +136,6 @@ publishing {
|
|||
}
|
||||
}
|
||||
|
||||
bintray {
|
||||
publications = ['publishedArtifacts']
|
||||
}
|
||||
|
||||
model {
|
||||
tasks.generatePomFileForPublishedArtifactsPublication {
|
||||
destination = file( "${buildDir}/generated-pom.xml" )
|
||||
}
|
||||
}
|
||||
|
||||
task generatePomFile( dependsOn: 'generatePomFileForPublishedArtifactsPublication' )
|
||||
|
||||
|
||||
task ciBuild( dependsOn: [clean, test, publish] )
|
||||
|
||||
task release( dependsOn: [clean, test, bintrayUpload] )
|
||||
|
|
|
@ -7,58 +7,67 @@
|
|||
|
||||
apply from: rootProject.file( 'gradle/base-information.gradle' )
|
||||
|
||||
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'maven-publish-auth'
|
||||
apply plugin: 'com.jfrog.bintray'
|
||||
|
||||
if ( project.isSnapshot ) {
|
||||
// For SNAPSHOT builds all we need to define is to add the JBoss SNAPSHOT server as
|
||||
// a publishing repository - NOTE that the plugin applies security over the
|
||||
// JBoss SNAPSHOT repo via a local user's Maven `settings.xml`
|
||||
apply from: rootProject.file( 'gradle/publishing-pom.gradle' )
|
||||
|
||||
apply plugin: 'maven-publish-auth'
|
||||
ext {
|
||||
bintrayUser = project.property( 'PERSONAL_BINTRAY_USER' )
|
||||
bintrayKey = project.property( 'PERSONAL_BINTRAY_API_KEY' )
|
||||
}
|
||||
|
||||
publishing {
|
||||
repositories {
|
||||
maven {
|
||||
name 'jboss-snapshots-repository'
|
||||
url 'https://repository.jboss.org/nexus/content/repositories/snapshots'
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
publishedArtifacts( MavenPublication )
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
name 'jboss-snapshots-repository'
|
||||
url 'https://repository.jboss.org/nexus/content/repositories/snapshots'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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': '2.2',
|
||||
'family': project.hibernateMajorMinorVersion
|
||||
]
|
||||
mavenCentralSync {
|
||||
sync = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
// otherwise, set up the bintray plugin for publishing the release artifacts to Bintray
|
||||
|
||||
apply plugin: 'com.jfrog.bintray'
|
||||
|
||||
ext {
|
||||
bintrayUser = project.property( 'PERSONAL_BINTRAY_USER' )
|
||||
bintrayKey = project.property( 'PERSONAL_BINTRAY_API_KEY' )
|
||||
model {
|
||||
tasks.generatePomFileForPublishedArtifactsPublication {
|
||||
destination = file( "${buildDir}/generated-pom.xml" )
|
||||
}
|
||||
}
|
||||
|
||||
bintray {
|
||||
user = project.bintrayUser
|
||||
key = project.bintrayKey
|
||||
|
||||
pkg {
|
||||
userOrg = 'hibernate'
|
||||
repo = 'artifacts'
|
||||
name = 'hibernate-orm'
|
||||
|
||||
version {
|
||||
name = project.version
|
||||
released = new Date()
|
||||
vcsTag = project.version
|
||||
gpg {
|
||||
sign = true
|
||||
}
|
||||
attributes = [
|
||||
'jpa': '2.2',
|
||||
'family': project.hibernateMajorMinorVersion
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
publish = false
|
||||
}
|
||||
|
||||
}
|
||||
task generatePomFile( dependsOn: 'generatePomFileForPublishedArtifactsPublication' )
|
||||
|
|
|
@ -21,7 +21,7 @@ ext {
|
|||
|
||||
publishing {
|
||||
publications {
|
||||
relocationPom( MavenPublication ) {
|
||||
publishedArtifacts {
|
||||
pom.withXml {
|
||||
def relocation = asNode().appendNode( 'distributionManagement' ).appendNode( 'relocation' )
|
||||
relocation.appendNode( 'groupId', project.relocatedGroupId)
|
||||
|
@ -32,4 +32,4 @@ publishing {
|
|||
}
|
||||
}
|
||||
|
||||
task release( dependsOn: publish )
|
||||
task release( dependsOn: bintrayUpload )
|
|
@ -153,7 +153,7 @@ task createModulesZip(type: Zip, dependsOn: [copyAndExpandModuleXml]) {
|
|||
|
||||
publishing {
|
||||
publications {
|
||||
mavenZip( MavenPublication ) {
|
||||
publishedArtifacts {
|
||||
artifact( createModulesZip ) {
|
||||
classifier artifactClassifier
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ publishing {
|
|||
|
||||
|
||||
task ciBuild( dependsOn: [clean, test, publish] )
|
||||
task release( dependsOn: [clean, test, publish] )
|
||||
task release( dependsOn: [clean, test, bintrayUpload] )
|
||||
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
|
Loading…
Reference in New Issue