Make download deps dependent on the output of the tar.gz file

Bug: 309547020
Change-Id: I44fd7087a517a31ec885f18e8e52ccb2872ba28c
diff --git a/d8_r8/commonBuildSrc/src/main/kotlin/DownloadAllDependenciesTask.kt b/d8_r8/commonBuildSrc/src/main/kotlin/DownloadAllDependenciesTask.kt
index 92c1af2..f05116d 100644
--- a/d8_r8/commonBuildSrc/src/main/kotlin/DownloadAllDependenciesTask.kt
+++ b/d8_r8/commonBuildSrc/src/main/kotlin/DownloadAllDependenciesTask.kt
@@ -15,6 +15,7 @@
 import org.gradle.api.provider.Property
 import org.gradle.api.tasks.InputFiles
 import org.gradle.api.tasks.OutputDirectories
+import org.gradle.api.tasks.OutputFiles
 import org.gradle.api.tasks.TaskAction
 import org.gradle.internal.os.OperatingSystem
 import org.gradle.workers.WorkAction
@@ -36,6 +37,13 @@
     return _thirdPartyDeps!!.map { _root!!.resolve(it.path) }
   }
 
+  @OutputFiles
+  fun getOutputFiles(): List<File> {
+      return _thirdPartyDeps!!.map {
+        _root!!.resolve(it.sha1File.resolveSibling(it.sha1File.name.replace(".sha1", "")))
+      }
+  }
+
   @Inject
   protected abstract fun getWorkerExecutor(): WorkerExecutor?