Ensure directory is present before downloading POM file
Bug: b/348324744
Change-Id: Iccd2a3596774431e0dcb3a81b38cfbcf6ca546ee
diff --git a/tools/download_kotlin_dev.py b/tools/download_kotlin_dev.py
index 7359f1d..337d6c8 100755
--- a/tools/download_kotlin_dev.py
+++ b/tools/download_kotlin_dev.py
@@ -59,16 +59,19 @@
raise Exception('Url: %s \n returned %s' %
(KOTLIN_RELEASE_URL, response.getcode()))
+ # Download checked in kotlin dev compiler before owerlaying with the new.
+ # TODO(sgjesse): This should just ensure an empty directory instead of
+ # relying on overlaying and reusing some jars.
+ utils.DownloadFromGoogleCloudStorage(
+ os.path.join(utils.THIRD_PARTY, "kotlin",
+ "kotlin-compiler-dev.tar.gz.sha1"))
+
# Check POM for expected dependencies.
check_pom(top_most_version_and_build)
# We can now download all files related to the kotlin compiler version.
print("Downloading version: " + top_most_version_and_build)
- utils.DownloadFromGoogleCloudStorage(
- os.path.join(utils.THIRD_PARTY, "kotlin",
- "kotlin-compiler-dev.tar.gz.sha1"))
-
download_and_save(
JETBRAINS_KOTLIN_MAVEN_URL +
"kotlin-compiler/{0}/kotlin-compiler-{0}.jar".format(