Fail if we are trying to fetch a dependency we don't have
The timestamp check will simply return 0 for a non existing file
Change-Id: I56e807ae4b5e650b14212fd99bafafb64932cfdf
diff --git a/buildSrc/src/main/java/tasks/DownloadDependency.java b/buildSrc/src/main/java/tasks/DownloadDependency.java
index 60128c5..59596a8 100644
--- a/buildSrc/src/main/java/tasks/DownloadDependency.java
+++ b/buildSrc/src/main/java/tasks/DownloadDependency.java
@@ -71,6 +71,10 @@
@TaskAction
public void execute() throws IOException, InterruptedException {
+ if (!sha1File.exists()) {
+ throw new RuntimeException("Missing sha1 file: " + sha1File);
+ }
+
// First run will write the tar.gz file, causing the second run to still be out-of-date.
// Check if the modification time of the tar is newer than the sha in which case we are done.
// Also, check the contents of the out directory because gradle appears to create it for us...