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

Commit d4b66df

Browse files
committed
Docs are no longer downloaded, Metadata is cached
1 parent 1038010 commit d4b66df

File tree

1 file changed

+1
-32
lines changed

1 file changed

+1
-32
lines changed

build.cake

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ 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 REFERENCE_DOCS_URL = "https://developer.android.com/reference/";
68-
var REFERENCE_DOCS_PACKAGELIST_URL = REFERENCE_DOCS_URL + "android/support/package-list";
6967

7068
// 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
7169
var BASE_API_INFO_URL = EnvironmentVariable("MONO_API_INFO_XML_URL") ?? "https://github.com/xamarin/AndroidSupportComponents/releases/download/27.0.2/api-info.xml";
@@ -604,36 +602,7 @@ Task ("buildtasks")
604602
Task ("droiddocs")
605603
.Does (() =>
606604
{
607-
EnsureDirectoryExists("./output");
608-
609-
var compressedDocsFile = "./output/docs-" + DOC_VERSION + ".zip";
610-
611-
if (!FileExists(compressedDocsFile)) {
612-
if (IsRunningOnWindows ())
613-
StartProcess ("util/droiddocs.exe", "scrape --out ./docs --url " + REFERENCE_DOCS_URL + " --package-list-source " + REFERENCE_DOCS_PACKAGELIST_URL + " --package-filter \"android.support\"");
614-
else
615-
StartProcess ("mono", "util/droiddocs.exe scrape --out ./docs --url " + REFERENCE_DOCS_URL + " --package-list-source " + REFERENCE_DOCS_PACKAGELIST_URL + " --package-filter \"android.support\"");
616-
617-
// Scraper misses a few files we require
618-
EnsureDirectoryExists("./docs/reference");
619-
DownloadFile(REFERENCE_DOCS_URL + "classes.html", "./docs/reference/classes.html");
620-
CopyFile ("./docs/reference/classes.html", "./docs/reference/index.html");
621-
DownloadFile(REFERENCE_DOCS_URL + "packages.html", "./docs/reference/packages.html");
622-
623-
624-
ZipCompress ("./docs", compressedDocsFile);
625-
}
626-
627-
if (!DirectoryExists("./docs"))
628-
Unzip (compressedDocsFile, "./docs");
629-
630-
if (!FileExists("./Metadata.generated.xml")) {
631-
// Generate metadata file from docs
632-
if (IsRunningOnWindows ())
633-
StartProcess ("util/droiddocs.exe", "transform --out ./Metadata.generated.xml --type Metadata --dir ./docs --prefix \"/reference/\" --package-filter \"android.support\"");
634-
else
635-
StartProcess ("mono", "util/droiddocs.exe transform --out ./Metadata.generated.xml --type Metadata --dir ./docs --prefix \"/reference/\" --package-filter \"android.support\"");
636-
}
605+
// This is now cached in the repo in Metadata.generated.xml
637606
});
638607

639608
Task ("clean")

0 commit comments

Comments
 (0)