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

Commit 2a411e7

Browse files
committed
Download DroidDocs and cache them by version
1 parent a2ad14a commit 2a411e7

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

build.cake

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#tool nuget:?package=Cake.MonoApiTools
44
#tool nuget:?package=Microsoft.DotNet.BuildTools.GenAPI&version=1.0.0-beta-00081
55

6+
#addin nuget:?package=Cake.Compression
67
#addin nuget:?package=Cake.Json
78
#addin nuget:?package=Cake.XCode
89
#addin nuget:?package=Cake.Xamarin
@@ -187,6 +188,7 @@ if (!string.IsNullOrEmpty (NUGET_SOURCES))
187188

188189
Task ("externals")
189190
.IsDependentOn ("externals-base")
191+
.IsDependentOn ("droiddocs")
190192
.WithCriteria (() => !FileExists ("./externals/support-v4/classes.jar"))
191193
.Does (() =>
192194
{
@@ -505,6 +507,22 @@ Task ("buildtasks").Does (() =>
505507
});
506508

507509

510+
Task ("droiddocs").Does(() =>
511+
{
512+
var compressedDocsFile = "./output/docs-" + AAR_VERSION + ".zip";
513+
514+
if (!FileExists(compressedDocsFile)) {
515+
if (IsRunningOnWindows ())
516+
StartProcess ("util/droiddocs.exe", "scrape --out ./docs --url https://developer.android.com/reference/ --package-filter \"android.support\"");
517+
else
518+
StartProcess ("mono", "util/droiddocs.exe scrape --out ./docs --url https://developer.android.com/reference/ --package-filter \"android.support\"");
519+
ZipCompress ("./docs", compressedDocsFile);
520+
}
521+
522+
if (!DirectoryExists("./docs"))
523+
Unzip (compressedDocsFile, "./docs");
524+
});
525+
508526

509527
SetupXamarinBuildTasks (buildSpec, Tasks, Task);
510528

util/droiddocs.exe

331 KB
Binary file not shown.

0 commit comments

Comments
 (0)