Skip to content
This repository has been archived by the owner on Nov 12, 2020. It is now read-only.

Commit

Permalink
[CF] fix cake build
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaseFlorell committed Apr 17, 2017
1 parent fddfe25 commit 68b0442
Showing 1 changed file with 26 additions and 16 deletions.
42 changes: 26 additions & 16 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ var configuration = Argument("configuration", "Release");
var primaryAuthor = "Chase Florell";

var touchDir = MakeAbsolute(Directory("./build-artifacts/output/touch"));
var droidDir=MakeAbsolute(Directory("./build-artifacts/output/droid"));


var droidDir = MakeAbsolute(Directory("./build-artifacts/output/droid"));
var coreDir = MakeAbsolute(Directory("./build-artifacts/output/core"));
Setup(context =>
{
var binsToClean = GetDirectories("./src/**/bin/");
var artifactsToClean = new []{
touchDir.ToString(),
droidDir.ToString()
droidDir.ToString(),
coreDir.ToString()
};
CleanDirectories(binsToClean);
CleanDirectories(artifactsToClean);
Expand All @@ -28,27 +28,36 @@ Setup(context =>
});

Task("Default")
.IsDependentOn("Pack");
.IsDependentOn("Package Library");

Task("Build-Droid")
.IsDependentOn("Patch-Assembly-Info")
Task("Build Droid")
.IsDependentOn("Patch Assembly Info")
.Does(() =>
{
MSBuild("./src/Xfx.Controls.Droid/Xfx.Controls.Droid.csproj", new MSBuildSettings()
.WithProperty("OutDir", droidDir.ToString())
.SetConfiguration(configuration));
});

Task("Build-Touch")
.IsDependentOn("Patch-Assembly-Info")
Task("Build Touch")
.IsDependentOn("Patch Assembly Info")
.Does(() =>
{
MSBuild("./src/Xfx.Controls.iOS/Xfx.Controls.iOS.csproj", new MSBuildSettings()
.WithProperty("OutDir", touchDir.ToString())
.SetConfiguration(configuration));
});

Task("Patch-Assembly-Info")
Task("Build Core")
.IsDependentOn("Patch Assembly Info")
.Does(() =>
{
MSBuild("./src/Xfx.Controls/Xfx.Controls.csproj", new MSBuildSettings()
.WithProperty("OutDir", coreDir.ToString())
.SetConfiguration(configuration));
});

Task("Patch Assembly Info")
.Does(() =>
{
var file = "./src/SolutionInfo.cs";
Expand All @@ -63,9 +72,10 @@ Task("Patch-Assembly-Info")
});
});

Task("Pack")
.IsDependentOn("Build-Droid")
.IsDependentOn("Build-Touch")
Task("Package Library")
.IsDependentOn("Build Droid")
.IsDependentOn("Build Touch")
.IsDependentOn("Build Core")
.Does(() => {
var nuGetPackSettings = new NuGetPackSettings {
Id = appName,
Expand All @@ -75,9 +85,9 @@ Task("Pack")
Description = "Xamarin Forms Extended Controls",
ProjectUrl = new Uri("https://github.com/XamFormsExtended/Xfx.Controls"),
Files = new [] {
new NuSpecContent {Source = droidDir.ToString() + "/Xfx.Controls.dll", Target = "lib/netcore45"},
new NuSpecContent {Source = droidDir.ToString() + "/Xfx.Controls.dll", Target = "lib/netstandard1.3"},
new NuSpecContent {Source = droidDir.ToString() + "/Xfx.Controls.dll", Target = "lib/portable-net45+win8+wpa81+wp8"},
new NuSpecContent {Source = coreDir.ToString() + "/Xfx.Controls/Xfx.Controls.dll", Target = "lib/netcore45"},
new NuSpecContent {Source = coreDir.ToString() + "/Xfx.Controls/Xfx.Controls.dll", Target = "lib/netstandard1.3"},
new NuSpecContent {Source = coreDir.ToString() + "/Xfx.Controls/Xfx.Controls.dll", Target = "lib/portable-net45+win8+wpa81+wp8"},

new NuSpecContent {Source = droidDir.ToString() + "/Xfx.Controls.Droid.dll", Target = "lib/MonoAndroid"},
new NuSpecContent {Source = droidDir.ToString() + "/Xfx.Controls.dll", Target = "lib/MonoAndroid"},
Expand Down

0 comments on commit 68b0442

Please sign in to comment.