Skip to content

Commit

Permalink
5.3 beta2
Browse files Browse the repository at this point in the history
  • Loading branch information
sebersole committed Feb 1, 2018
1 parent 21794a2 commit f28e037
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 56 deletions.
18 changes: 2 additions & 16 deletions gradle/published-java-module.gradle
Expand Up @@ -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

Expand Down Expand Up @@ -121,7 +120,7 @@ javadoc {

publishing {
publications {
publishedArtifacts( MavenPublication ) {
publishedArtifacts {
from components.java

artifact( sourcesJar ) {
Expand All @@ -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] )
Expand Down
81 changes: 45 additions & 36 deletions gradle/publishing-repos.gradle
Expand Up @@ -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' )
4 changes: 2 additions & 2 deletions hibernate-infinispan/hibernate-infinispan.gradle
Expand Up @@ -21,7 +21,7 @@ ext {

publishing {
publications {
relocationPom( MavenPublication ) {
publishedArtifacts {
pom.withXml {
def relocation = asNode().appendNode( 'distributionManagement' ).appendNode( 'relocation' )
relocation.appendNode( 'groupId', project.relocatedGroupId)
Expand All @@ -32,4 +32,4 @@ publishing {
}
}

task release( dependsOn: publish )
task release( dependsOn: bintrayUpload )
4 changes: 2 additions & 2 deletions hibernate-orm-modules/hibernate-orm-modules.gradle
Expand Up @@ -153,7 +153,7 @@ task createModulesZip(type: Zip, dependsOn: [copyAndExpandModuleXml]) {

publishing {
publications {
mavenZip( MavenPublication ) {
publishedArtifacts {
artifact( createModulesZip ) {
classifier artifactClassifier
}
Expand All @@ -163,7 +163,7 @@ publishing {


task ciBuild( dependsOn: [clean, test, publish] )
task release( dependsOn: [clean, test, publish] )
task release( dependsOn: [clean, test, bintrayUpload] )


// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down

0 comments on commit f28e037

Please sign in to comment.