5.3 beta2

This commit is contained in:
Steve Ebersole 2018-02-01 14:00:37 -06:00
parent 21794a29fc
commit f28e037a58
4 changed files with 59 additions and 64 deletions

View File

@ -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] )

View File

@ -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'
}
}
}
else {
// otherwise, set up the bintray plugin for publishing the release artifacts to Bintray
apply plugin: 'com.jfrog.bintray'
bintray {
user = project.bintrayUser
key = project.bintrayKey
ext {
bintrayUser = project.property( 'PERSONAL_BINTRAY_USER' )
bintrayKey = project.property( 'PERSONAL_BINTRAY_API_KEY' )
}
publications = ['publishedArtifacts']
bintray {
user = project.bintrayUser
key = project.bintrayKey
pkg {
userOrg = 'hibernate'
repo = 'artifacts'
name = 'hibernate-orm'
pkg {
userOrg = 'hibernate'
repo = 'artifacts'
name = 'hibernate-orm'
publish = true
version {
name = project.version
released = new Date()
vcsTag = project.version
gpg {
sign = true
}
attributes = [
version {
name = project.version
released = new Date()
vcsTag = project.version
gpg {
sign = true
}
attributes = [
'jpa': '2.2',
'family': project.hibernateMajorMinorVersion
]
]
mavenCentralSync {
sync = true
}
}
publish = false
}
}
model {
tasks.generatePomFileForPublishedArtifactsPublication {
destination = file( "${buildDir}/generated-pom.xml" )
}
}
task generatePomFile( dependsOn: 'generatePomFileForPublishedArtifactsPublication' )

View File

@ -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 )

View File

@ -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] )
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~