You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2013/07/12 22:38:43 UTC
svn commit: r1502679 - /httpcomponents/project-release-tools/trunk/rc.gradle
Author: olegk
Date: Fri Jul 12 20:38:43 2013
New Revision: 1502679
URL: http://svn.apache.org/r1502679
Log:
Added tasks to generate bin and src dist packages
Modified:
httpcomponents/project-release-tools/trunk/rc.gradle
Modified: httpcomponents/project-release-tools/trunk/rc.gradle
URL: http://svn.apache.org/viewvc/httpcomponents/project-release-tools/trunk/rc.gradle?rev=1502679&r1=1502678&r2=1502679&view=diff
==============================================================================
--- httpcomponents/project-release-tools/trunk/rc.gradle (original)
+++ httpcomponents/project-release-tools/trunk/rc.gradle Fri Jul 12 20:38:43 2013
@@ -56,53 +56,75 @@ rc.pom.modules.each { String submodule -
}
}
+task clean << {
+ File dst = file("${buildDir}/dists")
+ if (dst.exists()) {
+ GFileUtils.cleanDirectory(dst)
+ }
+}
+
task generate << {
logger.info("Generating RC artifacts ${rc.pom.artifactId}:${rc.pom.version}")
mvn.exec(rc.localDir,
'clean', 'install', 'site', 'javadoc:aggregate')
}
-task bundle << {
- logger.info("Building release bundles ${rc.pom.artifactId}:${rc.pom.version}")
-
- File binWinDir = new File(project.buildDir, 'bin-win')
- File binUxDir = new File(project.buildDir, 'bin-ux')
- File osgiWinDir = new File(project.buildDir, 'bin-osgi-win')
- File osgiUxDir = new File(project.buildDir, 'bin-osgi-ux')
- File srcWinDir = new File(project.buildDir, 'src-win')
- File srcUxDir = new File(project.buildDir, 'src-ux')
-
- files(binWinDir, binUxDir, osgiWinDir, osgiUxDir, srcWinDir, srcUxDir).each { File dir ->
- if (dir.exists()) {
- GFileUtils.cleanDirectory(dir)
- }
- }
-
- copy {
- with docs(rc, Line.CRLF), atrifacts(configurations.rc)
- into binWinDir
- }
- copy {
- with docs(rc, Line.LF), atrifacts(configurations.rc)
- into binUxDir
- }
- copy {
- with docs(rc, Line.CRLF), osgiBundle(rc)
- into osgiWinDir
- }
- copy {
- with docs(rc, Line.LF), osgiBundle(rc)
- into osgiUxDir
- }
- copy {
- with sources(rc, Line.CRLF)
- into srcWinDir
- }
- copy {
- with sources(rc, Line.LF)
- into srcUxDir
- }
+task distWinBin(type: Zip) {
+ with docs(rc, Line.CRLF), atrifacts(configurations.rc)
+ destinationDir = file("${buildDir}/dists")
+ baseName = rc.pom.artifactId
+ version = rc.pom.version
+ classifier = 'bin'
+}
+
+task distUxBin(type: Tar) {
+ with docs(rc, Line.LF), atrifacts(configurations.rc)
+ destinationDir = file("${buildDir}/dists")
+ baseName = rc.pom.artifactId
+ version = rc.pom.version
+ classifier = 'bin'
+ compression = Compression.GZIP
+ extension = "tar.gz"
+}
+
+task distWinOSGiBin(type: Zip) {
+ with docs(rc, Line.CRLF), osgiBundle(rc)
+ destinationDir = file("${buildDir}/dists")
+ baseName = rc.pom.artifactId
+ version = rc.pom.version
+ classifier = 'osgi-bin'
+}
+
+task distUxOSGiBin(type: Tar) {
+ with docs(rc, Line.LF), osgiBundle(rc)
+ destinationDir = file("${buildDir}/dists")
+ baseName = rc.pom.artifactId
+ version = rc.pom.version
+ classifier = 'osgi-bin'
+ compression = Compression.GZIP
+ extension = "tar.gz"
+}
+
+task distWinSrc(type: Zip) {
+ with sources(rc, Line.CRLF)
+ destinationDir = file("${buildDir}/dists")
+ baseName = rc.pom.artifactId
+ version = rc.pom.version
+ classifier = 'src'
+}
+
+task distUxSrc(type: Tar) {
+ with sources(rc, Line.LF)
+ destinationDir = file("${buildDir}/dists")
+ baseName = rc.pom.artifactId
+ version = rc.pom.version
+ classifier = 'src'
+ compression = Compression.GZIP
+ extension = "tar.gz"
+}
+task dist(dependsOn: ['distWinBin', 'distUxBin',
+ 'distWinOSGiBin', 'distUxOSGiBin', 'distWinSrc', 'distUxSrc']) {
}
CopySpec docs(HCProject hcProject, String delim) {
@@ -144,7 +166,6 @@ CopySpec atrifacts(Configuration cfg) {
CopySpec osgiBundle(HCProject hcProject) {
CopySpec spec = copySpec {
- into '.'
}
hcProject.pom.modules.each { String submodule ->
if (submodule.endsWith('-osgi')) {
@@ -181,4 +202,5 @@ CopySpec sources(HCProject hcProject, St
exclude '**/.*/**'
}
}
+
}