Change archive file names while unpacking, rather than in two stages
This commit is contained in:
parent
c812e72cb5
commit
2aadd55227
|
@ -1,5 +1,3 @@
|
|||
apply plugin: 'base'
|
||||
|
||||
task downloadAjaxslt(type: de.undercouch.gradle.tasks.download.Download) {
|
||||
def version = '0.8.1'
|
||||
ext {
|
||||
|
@ -15,16 +13,13 @@ task verifyAjaxslt(type: VerifyWithStamp, dependsOn: downloadAjaxslt) {
|
|||
checksum 'c995abe3310a401bb4db7f28a6409756'
|
||||
}
|
||||
|
||||
task unpackAjaxslt(type: Sync, dependsOn: verifyAjaxslt) {
|
||||
from tarTree(verifyAjaxslt.src)
|
||||
into temporaryDir
|
||||
}
|
||||
|
||||
task unversionAjaxslt(type: Sync, dependsOn: unpackAjaxslt) {
|
||||
from new File(files(unpackAjaxslt)[0], downloadAjaxslt.versionedArchive)
|
||||
into 'examples-src/ajaxslt'
|
||||
clean { delete unversionAjaxslt }
|
||||
}
|
||||
|
||||
task processTestResources(dependsOn: unversionAjaxslt) {
|
||||
task unpackAjaxslt(type: Copy, dependsOn: verifyAjaxslt) {
|
||||
from(tarTree(verifyAjaxslt.src)) {
|
||||
eachFile {
|
||||
def newSegments = ['ajaxslt'] + it.relativePath.segments[1 .. -1] as String[]
|
||||
def newPath = new RelativePath(!it.directory, newSegments)
|
||||
it.relativePath = newPath
|
||||
}
|
||||
}
|
||||
into 'examples-src'
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ dependencies {
|
|||
)
|
||||
}
|
||||
|
||||
processTestResources.dependsOn ':com.ibm.wala.cast.js.test.data:processTestResources'
|
||||
processTestResources.dependsOn ':com.ibm.wala.cast.js.test.data:unpackAjaxslt'
|
||||
|
||||
test {
|
||||
maxHeapSize = '800M'
|
||||
|
|
|
@ -29,19 +29,24 @@ task verifyBcel(type: VerifyWithStamp, dependsOn: downloadBcel) {
|
|||
checksum '19bffd7f217b0eae415f1ef87af2f0bc'
|
||||
}
|
||||
|
||||
task extractBcel(type: Sync, dependsOn: verifyBcel) {
|
||||
from tarTree(verifyBcel.src)
|
||||
include 'bcel-5.2/bcel-5.2.jar'
|
||||
into temporaryDir
|
||||
task extractBcel(type: Copy, dependsOn: verifyBcel) {
|
||||
from(tarTree(verifyBcel.src)) {
|
||||
include 'bcel-5.2/bcel-5.2.jar'
|
||||
eachFile {
|
||||
relativePath = new RelativePath(!directory, relativePath.lastName)
|
||||
}
|
||||
}
|
||||
into projectDir
|
||||
includeEmptyDirs false
|
||||
outputs.files 'bcel-5.2.jar'
|
||||
}
|
||||
|
||||
task copyBcel(type: Copy, dependsOn: extractBcel) {
|
||||
from new File(files(extractBcel)[0], extractBcel.includes[0])
|
||||
into projectDir
|
||||
clean { delete 'bcel-5.2.jar' }
|
||||
task cleanExtractBcel(type: Delete) {
|
||||
delete files(extractBcel)[0]
|
||||
}
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// download "java-cup-11a.jar"
|
||||
|
|
Loading…
Reference in New Issue