33 lines
830 B
Groovy
33 lines
830 B
Groovy
apply plugin: 'base'
|
|
|
|
task downloadAjaxslt {
|
|
def version = '0.8.1'
|
|
def versionedArchive = "ajaxslt-${version}.tar.gz"
|
|
outputs.file "$temporaryDir/$versionedArchive"
|
|
doLast {
|
|
download {
|
|
src "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/ajaxslt/$versionedArchive"
|
|
dest outputs.files.singleFile
|
|
overwrite true
|
|
onlyIfModified true
|
|
useETag true
|
|
}
|
|
verifyChecksum {
|
|
src outputs.files.singleFile
|
|
checksum 'c995abe3310a401bb4db7f28a6409756'
|
|
}
|
|
}
|
|
}
|
|
|
|
task unpackAjaxslt(type: Sync, dependsOn: downloadAjaxslt) {
|
|
from(tarTree(files(downloadAjaxslt).singleFile)) {
|
|
eachFile {
|
|
def newSegments = relativePath.segments[1 .. -1] as String[]
|
|
relativePath new RelativePath(!directory, newSegments)
|
|
}
|
|
}
|
|
into 'examples-src/ajaxslt'
|
|
}
|
|
|
|
clean.dependsOn cleanUnpackAjaxslt
|