Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Commit 5a39847

Browse files
committed
Download docs from external
1 parent 0aa19f2 commit 5a39847

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

build.cake

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ var MAVEN_REPO_URL = "https://dl.google.com/dl/android/maven2/";
6464
var BUILD_TOOLS_URL = "https://dl-ssl.google.com/android/repository/build-tools_r27-macosx.zip";
6565
var ANDROID_SDK_VERSION = IsRunningOnWindows () ? "v8.0" : "android-26";
6666
var RENDERSCRIPT_FOLDER = "android-8.1.0";
67+
var DOCS_URL = "https://bosstoragemirror.blob.core.windows.net/android-docs-scraper/ea/ea65204c51cf20873c17c32584f3b12ed390ac55/android-support.zip";
68+
var REFERENCE_DOCS_URL = "https://developer.android.com/reference/";
6769

6870
// We grab the previous release's api-info.xml to use as a comparison for this build's generated info to make an api-diff
6971
var BASE_API_INFO_URL = EnvironmentVariable("MONO_API_INFO_XML_URL") ?? "https://github.com/xamarin/AndroidSupportComponents/releases/download/27.0.2/api-info.xml";
@@ -602,7 +604,17 @@ Task ("buildtasks")
602604
Task ("droiddocs")
603605
.Does (() =>
604606
{
605-
// This is now cached in the repo in Metadata.generated.xml
607+
if (!FileExists("./externals/docs.zip"))
608+
DownloadFile(DOCS_URL, "./externals/docs.zip");
609+
610+
if (DirectoryExists("./docs"))
611+
DeleteDirectory("./docs", true);
612+
613+
Unzip("./externals/docs.zip", "./docs");
614+
615+
DownloadFile(REFERENCE_DOCS_URL + "classes.html", "./docs/reference/classes.html");
616+
CopyFile ("./docs/reference/classes.html", "./docs/reference/index.html");
617+
DownloadFile(REFERENCE_DOCS_URL + "packages.html", "./docs/reference/packages.html");
606618
});
607619

608620
Task ("clean")

0 commit comments

Comments
 (0)