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) {
|
task downloadAjaxslt(type: de.undercouch.gradle.tasks.download.Download) {
|
||||||
def version = '0.8.1'
|
def version = '0.8.1'
|
||||||
ext {
|
ext {
|
||||||
|
@ -15,16 +13,13 @@ task verifyAjaxslt(type: VerifyWithStamp, dependsOn: downloadAjaxslt) {
|
||||||
checksum 'c995abe3310a401bb4db7f28a6409756'
|
checksum 'c995abe3310a401bb4db7f28a6409756'
|
||||||
}
|
}
|
||||||
|
|
||||||
task unpackAjaxslt(type: Sync, dependsOn: verifyAjaxslt) {
|
task unpackAjaxslt(type: Copy, dependsOn: verifyAjaxslt) {
|
||||||
from tarTree(verifyAjaxslt.src)
|
from(tarTree(verifyAjaxslt.src)) {
|
||||||
into temporaryDir
|
eachFile {
|
||||||
}
|
def newSegments = ['ajaxslt'] + it.relativePath.segments[1 .. -1] as String[]
|
||||||
|
def newPath = new RelativePath(!it.directory, newSegments)
|
||||||
task unversionAjaxslt(type: Sync, dependsOn: unpackAjaxslt) {
|
it.relativePath = newPath
|
||||||
from new File(files(unpackAjaxslt)[0], downloadAjaxslt.versionedArchive)
|
}
|
||||||
into 'examples-src/ajaxslt'
|
}
|
||||||
clean { delete unversionAjaxslt }
|
into 'examples-src'
|
||||||
}
|
|
||||||
|
|
||||||
task processTestResources(dependsOn: unversionAjaxslt) {
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 {
|
test {
|
||||||
maxHeapSize = '800M'
|
maxHeapSize = '800M'
|
||||||
|
|
|
@ -29,19 +29,24 @@ task verifyBcel(type: VerifyWithStamp, dependsOn: downloadBcel) {
|
||||||
checksum '19bffd7f217b0eae415f1ef87af2f0bc'
|
checksum '19bffd7f217b0eae415f1ef87af2f0bc'
|
||||||
}
|
}
|
||||||
|
|
||||||
task extractBcel(type: Sync, dependsOn: verifyBcel) {
|
task extractBcel(type: Copy, dependsOn: verifyBcel) {
|
||||||
from tarTree(verifyBcel.src)
|
from(tarTree(verifyBcel.src)) {
|
||||||
include 'bcel-5.2/bcel-5.2.jar'
|
include 'bcel-5.2/bcel-5.2.jar'
|
||||||
into temporaryDir
|
eachFile {
|
||||||
|
relativePath = new RelativePath(!directory, relativePath.lastName)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
into projectDir
|
||||||
|
includeEmptyDirs false
|
||||||
|
outputs.files 'bcel-5.2.jar'
|
||||||
}
|
}
|
||||||
|
|
||||||
task copyBcel(type: Copy, dependsOn: extractBcel) {
|
task cleanExtractBcel(type: Delete) {
|
||||||
from new File(files(extractBcel)[0], extractBcel.includes[0])
|
delete files(extractBcel)[0]
|
||||||
into projectDir
|
|
||||||
clean { delete 'bcel-5.2.jar' }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// download "java-cup-11a.jar"
|
// download "java-cup-11a.jar"
|
||||||
|
|
Loading…
Reference in New Issue