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
2 changes: 1 addition & 1 deletion DeviceTests/DeviceTests.Android/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ protected override void OnCreate(Bundle bundle)
Xamarin.Essentials.Platform.Init(this, bundle);

var hostIp = Intent.Extras?.GetString("HOST_IP", null);
var hostPort = Intent.Extras?.GetInt("HOST_PORT", 10578) ?? 10578;
var hostPort = Intent.Extras?.GetInt("HOST_PORT", 63559) ?? 63559;

if (!string.IsNullOrEmpty(hostIp))
{
Expand Down
231 changes: 133 additions & 98 deletions DeviceTests/build.cake

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Tests/Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable>
<AssemblyName>XamarinEssentialsTests</AssemblyName>
<DebugType>portable</DebugType>
Expand Down
2 changes: 1 addition & 1 deletion Xamarin.Essentials/Xamarin.Essentials.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<AssemblyFileVersion>1.0.0.0</AssemblyFileVersion>
<Version>1.0.0</Version>
<PackageVersion>$(Version)$(VersionSuffix)</PackageVersion>
<PackageVersion>1.0.0</PackageVersion>
<Authors>Microsoft</Authors>
<Owners>microsoft,Xamarin,XamarinNuGet</Owners>
<NeutralLanguage>en</NeutralLanguage>
Expand Down
391 changes: 135 additions & 256 deletions azure-pipelines.yml

Large diffs are not rendered by default.

91 changes: 91 additions & 0 deletions build.cake
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
var TARGET = Argument("t", Argument("target", "ci"));

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") ?? "");

Task("prepare")
.Does(() =>
{
// Update .csproj nuget versions
XmlPoke("./Xamarin.Essentials/Xamarin.Essentials.csproj", "/Project/PropertyGroup/PackageVersion", NUGET_VERSION);
});

Task("libs")
.IsDependentOn("prepare")
.Does(() =>
{
MSBuild("./Xamarin.Essentials/Xamarin.Essentials.csproj", new MSBuildSettings()
.EnableBinaryLogger("./output/binlogs/libs.binlog")
.SetConfiguration("Release")
.WithRestore());
});

Task("nugets")
.IsDependentOn("prepare")
.IsDependentOn("libs")
.IsDependentOn("docs")
.Does(() =>
{
MSBuild("./Xamarin.Essentials/Xamarin.Essentials.csproj", new MSBuildSettings()
.EnableBinaryLogger("./output/binlogs/nugets.binlog")
.SetConfiguration("Release")
.WithRestore()
.WithProperty("PackageOutputPath", MakeAbsolute(new FilePath("./output/")).FullPath)
.WithTarget("Pack"));
});

Task("tests")
.IsDependentOn("libs")
.Does(() =>
{
var failed = 0;

foreach (var csproj in GetFiles("./Tests/**/*.csproj")) {
try {
DotNetCoreTest(csproj.FullPath, new DotNetCoreTestSettings {
Configuration = "Release",
Logger = $"trx;LogFileName={csproj.GetFilenameWithoutExtension()}.trx",
});
} catch (Exception) {
failed++;
}
}

var output = $"./output/test-results/";
EnsureDirectoryExists(output);
CopyFiles($"./tests/**/TestResults/*.trx", output);

if (failed > 0)
throw new Exception($"{failed} tests have failed.");
});

Task("samples")
.IsDependentOn("nugets")
.Does(() =>
{
MSBuild("./Xamarin.Essentials.sln", new MSBuildSettings()
.EnableBinaryLogger("./output/binlogs/samples.binlog")
.SetConfiguration("Release")
.WithRestore());
});

Task("docs")
.IsDependentOn("libs")
.WithCriteria(IsRunningOnWindows())
.Does(() =>
{
MSBuild("./Xamarin.Essentials/Xamarin.Essentials.csproj", new MSBuildSettings()
.EnableBinaryLogger("./output/binlogs/nugets.binlog")
.SetConfiguration("Release")
.WithRestore()
.WithTarget("mdocupdatedocs"));
});

Task("ci")
.IsDependentOn("libs")
.IsDependentOn("nugets")
.IsDependentOn("tests")
.IsDependentOn("samples");

RunTarget(TARGET);
37 changes: 0 additions & 37 deletions build.ps1

This file was deleted.

1 change: 0 additions & 1 deletion generate-docs.cmd

This file was deleted.