HHH-8147 - Update to use distribution plugin for createing release bundles
This commit is contained in:
parent
e037fcb55f
commit
2b2f333593
|
@ -1,5 +1,6 @@
|
|||
apply plugin: 'base'
|
||||
apply plugin: 'idea'
|
||||
apply plugin: 'distribution'
|
||||
apply from: "../utilities.gradle"
|
||||
|
||||
buildDir = "target"
|
||||
|
@ -29,7 +30,7 @@ task aggregateJavadocs(type: Javadoc) {
|
|||
parent.subprojects.each{ Project subProject->
|
||||
// skip certain sub-projects
|
||||
if ( ! ['release','documentation'].contains( subProject.name ) ) {
|
||||
subProject.sourceSets.each { SourceSet sourceSet ->
|
||||
subProject.sourceSets.each { sourceSet ->
|
||||
// skip certain source sets
|
||||
if ( ! ['test','matrix'].contains( sourceSet.name ) ) {
|
||||
source sourceSet.java
|
||||
|
@ -96,9 +97,10 @@ aggregateJavadocs.doLast {
|
|||
ext.releaseBuildDir = mkdir( buildDir )
|
||||
task prepareReleaseBundles( dependsOn: [parent.project( 'documentation' ).tasks.buildDocs,aggregateJavadocs] )
|
||||
|
||||
|
||||
ext.releaseCopySpec = copySpec {
|
||||
into( "hibernate-release-$project.version" ) {
|
||||
distributions {
|
||||
main {
|
||||
baseName = 'hibernate-release'
|
||||
contents {
|
||||
from new File( parent.projectDir, 'lgpl.txt' )
|
||||
from new File( parent.projectDir, 'changelog.txt' )
|
||||
from new File( parent.projectDir, 'hibernate_logo.gif' )
|
||||
|
@ -111,10 +113,6 @@ ext.releaseCopySpec = copySpec {
|
|||
from parent.project( 'hibernate-core' ).configurations.provided.files { dep -> dep.name == 'javassist' }
|
||||
}
|
||||
|
||||
// into('lib/bytecode/javassist') {
|
||||
// from parent.project( 'hibernate-core' ).configurations.provided.files { dep -> dep.name == 'javassist' }
|
||||
// }
|
||||
|
||||
into( 'lib/jpa' ) {
|
||||
from parent.project( 'hibernate-entitymanager' ).configurations.archives.allArtifacts.files.filter{ file -> !file.name.endsWith('-sources.jar') }
|
||||
}
|
||||
|
@ -179,23 +177,12 @@ ext.releaseCopySpec = copySpec {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task buildReleaseZip( type: Zip, dependsOn: [prepareReleaseBundles] ) {
|
||||
description = "Build release bundle in ZIP format"
|
||||
baseName = 'hibernate-release'
|
||||
destinationDir = releaseBuildDir
|
||||
with project.releaseCopySpec
|
||||
}
|
||||
distZip.dependsOn prepareReleaseBundles
|
||||
distTar.dependsOn prepareReleaseBundles
|
||||
|
||||
task buildReleaseTgz( type: Tar, dependsOn: [prepareReleaseBundles] ) {
|
||||
description = "Build release bundle in GZIP format"
|
||||
baseName = 'hibernate-release'
|
||||
destinationDir = releaseBuildDir
|
||||
compression = Compression.GZIP
|
||||
with project.releaseCopySpec
|
||||
}
|
||||
|
||||
task buildReleaseBundles( dependsOn: [buildReleaseZip,buildReleaseTgz] ) {
|
||||
task buildReleaseBundles( dependsOn: [distZip,distTar] ) {
|
||||
description = "Build release bundle in all formats"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue