Skip to content
This repository has been archived by the owner on Oct 25, 2021. It is now read-only.

Commit

Permalink
[cake] delete unused Xamarin.Android files
Browse files Browse the repository at this point in the history
- Right now for Android, we need to use a Jenkins build of
Xamarin.Android, so we have a Cake task that downloads and unzips
everything in the zip
- This is an improvement to delete unused files so if we make a preview
release, our bundled Xamarin.Android will not be quite so large
  • Loading branch information
jonathanpeppers committed Jul 20, 2017
1 parent 6e13068 commit 8adb7a2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions build.cake
Expand Up @@ -157,6 +157,7 @@ Task("Run-C-Tests")
Exec(binDir + File("common.Tests"));
});

//NOTE: this is a temporary task for downloading a Jenkins build of Xamarin.Android
Task("Download-Xamarin-Android")
.Does(() =>
{
Expand All @@ -180,6 +181,18 @@ Task("Download-Xamarin-Android")
//Move bin/Release to final directory in ./external/Xamarin.Android
MoveDirectory(Directory(tempDir) + Directory("./bin/Release"), xamarinPath);
//There are some additional files we don't need for Embeddinator
//Removing them should make our distribution smaller 875.6MB -> 277.2MB (92.7MB compressed)
DeleteFiles(GetFiles("./external/Xamarin.Android/*"));
DeleteDirectory("./external/Xamarin.Android/bin", true);
DeleteDirectory("./external/Xamarin.Android/lib/mandroid", true);
foreach (var directory in GetDirectories("./external/Xamarin.Android/lib/xbuild-frameworks/MonoAndroid/*"))
{
var name = directory.GetDirectoryName();
if (!name.EndsWith("v1.0") && !name.EndsWith("v2.3") && !name.EndsWith("v7.0"))
DeleteDirectory(directory, true);
}
}
finally
{
Expand Down

0 comments on commit 8adb7a2

Please sign in to comment.