Automated Gradle-driven download of JLex test input

This commit is contained in:
Ben Liblit 2017-12-20 14:22:53 -06:00
parent 777509adbc
commit 74e39ce101
1 changed files with 32 additions and 0 deletions

View File

@ -1 +1,33 @@
plugins {
id 'de.undercouch.download' version '3.3.0'
}
sourceSets.main.java.srcDir 'src'
////////////////////////////////////////////////////////////////////////
//
// download JLex
//
import de.undercouch.gradle.tasks.download.*
def versionedArchive = 'ajaxslt-0.8.1'
def packedArchive = "${versionedArchive}.tar.gz"
task downloadJLex(type: Download) {
src "http://www.cs.princeton.edu/~appel/modern/java/JLex/current/Main.java"
dest 'src/JLex/Main.java'
overwrite false
}
task verifyJLex(type: Verify, dependsOn: downloadJLex) {
src downloadJLex.dest
checksum 'fe0cff5db3e2f0f5d67a153cf6c783af'
}
clean {
delete downloadJLex.dest.parent
}
compileJava.dependsOn verifyJLex