Skip to content
This repository was archived by the owner on May 15, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions DeviceTests/build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ System.Environment.SetEnvironmentVariable("PATH",
$"{ANDROID_HOME}/emulator" + System.IO.Path.PathSeparator +
EnvironmentVariable("PATH"));

var RESTORE_CONFIG = MakeAbsolute((FilePath)"../devopsnuget.config").FullPath;

// utils

Expand Down Expand Up @@ -99,6 +100,7 @@ Task("build-ios")
c.Properties["Platform"] = new List<string> { "iPhoneSimulator" };
c.Properties["BuildIpa"] = new List<string> { "true" };
c.Properties["ContinuousIntegrationBuild"] = new List<string> { "false" };
c.Properties["RestoreConfigFile"] = new List<string> { RESTORE_CONFIG };
c.Targets.Clear();
c.Targets.Add("Rebuild");
c.BinaryLogger = new MSBuildBinaryLogSettings {
Expand Down Expand Up @@ -142,6 +144,7 @@ Task("build-android")
c.Configuration = "Debug"; // needs to be debug so unit tests get discovered
c.Restore = true;
c.Properties["ContinuousIntegrationBuild"] = new List<string> { "false" };
c.Properties["RestoreConfigFile"] = new List<string> { RESTORE_CONFIG };
c.Targets.Clear();
c.Targets.Add("Rebuild");
c.Targets.Add("SignAndroidPackage");
Expand Down Expand Up @@ -221,6 +224,7 @@ Task("build-uwp")
c.Properties["AppxBundlePlatforms"] = new List<string> { "x86" };
c.Properties["AppxBundle"] = new List<string> { "Always" };
c.Properties["AppxPackageSigningEnabled"] = new List<string> { "true" };
c.Properties["RestoreConfigFile"] = new List<string> { RESTORE_CONFIG };
c.Targets.Clear();
c.Targets.Add("Rebuild");
c.BinaryLogger = new MSBuildBinaryLogSettings {
Expand Down
9 changes: 9 additions & 0 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ var NUGET_VERSION = EnvironmentVariable("NUGET_VERSION") ?? "1.0.0";
var GIT_SHA = Argument("gitSha", EnvironmentVariable("GIT_SHA") ?? "");
var GIT_BRANCH_NAME = Argument("gitBranch", EnvironmentVariable("GIT_BRANCH_NAME") ?? "");

var RESTORE_CONFIG = MakeAbsolute(new FilePath("./devopsnuget.config")).FullPath;

Task("prepare")
.Does(() =>
{
Expand All @@ -18,6 +20,7 @@ Task("libs")
MSBuild("./Xamarin.Essentials/Xamarin.Essentials.csproj", new MSBuildSettings()
.EnableBinaryLogger("./output/binlogs/libs.binlog")
.SetConfiguration("Release")
.WithProperty("RestoreConfigFile", RESTORE_CONFIG)
.WithRestore());
});

Expand All @@ -32,6 +35,7 @@ Task("nugets")
.SetConfiguration("Release")
.WithRestore()
.WithProperty("PackageOutputPath", MakeAbsolute(new FilePath("./output/")).FullPath)
.WithProperty("RestoreConfigFile", RESTORE_CONFIG)
.WithTarget("Pack"));
});

Expand All @@ -46,6 +50,9 @@ Task("tests")
DotNetCoreTest(csproj.FullPath, new DotNetCoreTestSettings {
Configuration = "Release",
Logger = $"trx;LogFileName={csproj.GetFilenameWithoutExtension()}.trx",
EnvironmentVariables = new Dictionary<string, string> {
{ "RestoreConfigFile", RESTORE_CONFIG }
}
});
} catch (Exception) {
failed++;
Expand All @@ -67,6 +74,7 @@ Task("samples")
MSBuild("./Xamarin.Essentials.sln", new MSBuildSettings()
.EnableBinaryLogger("./output/binlogs/samples.binlog")
.SetConfiguration("Release")
.WithProperty("RestoreConfigFile", RESTORE_CONFIG)
.WithRestore());
});

Expand All @@ -79,6 +87,7 @@ Task("docs")
.EnableBinaryLogger("./output/binlogs/docs.binlog")
.SetConfiguration("Release")
.WithRestore()
.WithProperty("RestoreConfigFile", RESTORE_CONFIG)
.WithTarget("mdocupdatedocs"));
});

Expand Down
11 changes: 11 additions & 0 deletions devopsnuget.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear/>
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" protocolVersion="3" />
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" protocolVersion="3" />
</packageSources>
<activePackageSource>
<add key="All" value="(Aggregate source)" />
</activePackageSource>
</configuration>
18 changes: 0 additions & 18 deletions nuget.config

This file was deleted.