diff --git a/com.ibm.wala.cast.js.test.data/build.gradle b/com.ibm.wala.cast.js.test.data/build.gradle index efa7a5798..b5ecf1d38 100644 --- a/com.ibm.wala.cast.js.test.data/build.gradle +++ b/com.ibm.wala.cast.js.test.data/build.gradle @@ -2,34 +2,31 @@ apply plugin: 'base' import de.undercouch.gradle.tasks.download.* -def versionedArchive = 'ajaxslt-0.8.1' -def packedArchive = "${versionedArchive}.tar.gz" - task downloadAjaxslt(type: Download) { - src "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/ajaxslt/${packedArchive}" - dest new File(buildDir, packedArchive) + def version = '0.8.1' + ext { + versionedArchive = "ajaxslt-$version" + } + src "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/ajaxslt/${versionedArchive}.tar.gz" + dest temporaryDir overwrite false } task verifyAjaxslt(type: Verify, dependsOn: downloadAjaxslt) { - src downloadAjaxslt.dest + src files(downloadAjaxslt)[0] checksum 'c995abe3310a401bb4db7f28a6409756' } task unpackAjaxslt(type: Sync, dependsOn: verifyAjaxslt) { from tarTree(verifyAjaxslt.src) - into buildDir + into temporaryDir } task unversionAjaxslt(type: Sync, dependsOn: unpackAjaxslt) { - from new File(buildDir, versionedArchive) + from new File(files(unpackAjaxslt)[0], downloadAjaxslt.versionedArchive) into 'examples-src/ajaxslt' + clean { delete unversionAjaxslt } } task processTestResources(dependsOn: unversionAjaxslt) { } - -clean { - delete unversionAjaxslt - delete downloadAjaxslt -}