Browse Source

Switch Cake to use a dirs.proj traversal project to simplify the solution.

pull/1815/head
Jeremy Koritzinsky 8 years ago
parent
commit
065d6d01d8
  1. 2
      .travis.yml
  2. 852
      Avalonia.sln
  3. 6
      appveyor.yml
  4. 66
      build.cake
  5. 8
      build/AndroidWorkarounds.props
  6. 3
      build/System.Memory.props
  7. 5
      build/iOSWorkarounds.props
  8. 21
      dirs.proj
  9. 5
      global.json
  10. 29
      packages.cake
  11. 16
      parameters.cake
  12. 3
      samples/ControlCatalog.Android/ControlCatalog.Android.csproj
  13. 1
      samples/ControlCatalog.iOS/ControlCatalog.iOS.csproj
  14. 3
      src/Android/Avalonia.Android/Avalonia.Android.csproj
  15. 3
      src/Android/Avalonia.AndroidTestApplication/Avalonia.AndroidTestApplication.csproj
  16. 8
      src/iOS/Avalonia.iOS/Avalonia.iOS.csproj
  17. 3
      src/iOS/Avalonia.iOSTestApplication/Avalonia.iOSTestApplication.csproj
  18. 125
      src/tools/Avalonia.Designer.HostApp.NetFX/Avalonia.Designer.HostApp.NetFX.csproj

2
.travis.yml

@ -11,7 +11,7 @@ mono:
- 5.2.0 - 5.2.0
dotnet: 2.1.200 dotnet: 2.1.200
script: script:
- ./build.sh --target "Travis" --platform "NetCoreOnly" --configuration "Release" - ./build.sh --target "Travis" --configuration "Release"
notifications: notifications:
email: false email: false
webhooks: webhooks:

852
Avalonia.sln

File diff suppressed because it is too large

6
appveyor.yml

@ -11,10 +11,6 @@ environment:
MYGET_API_URL: https://www.myget.org/F/avalonia-ci/api/v2/package MYGET_API_URL: https://www.myget.org/F/avalonia-ci/api/v2/package
init: init:
- ps: if (Test-Path env:nuget_address) {[System.IO.File]::AppendAllText("C:\Windows\System32\drivers\etc\hosts", "`n$($env:nuget_address)`tapi.nuget.org")} - ps: if (Test-Path env:nuget_address) {[System.IO.File]::AppendAllText("C:\Windows\System32\drivers\etc\hosts", "`n$($env:nuget_address)`tapi.nuget.org")}
install:
- if not exist dotnet-2.0.0.exe appveyor DownloadFile https://download.microsoft.com/download/0/F/D/0FD852A4-7EA1-4E2A-983A-0484AC19B92C/dotnet-sdk-2.0.0-win-x64.exe -FileName "dotnet-2.0.0.exe"
- ps: Start-Process -FilePath "dotnet-2.0.0.exe" -ArgumentList "/quiet" -Wait
- cmd: set PATH=%programfiles(x86)%\GtkSharp\2.12\bin\;%PATH%
before_build: before_build:
- git submodule update --init - git submodule update --init
build_script: build_script:
@ -25,5 +21,3 @@ artifacts:
- path: artifacts\nuget\*.nupkg - path: artifacts\nuget\*.nupkg
- path: artifacts\zip\*.zip - path: artifacts\zip\*.zip
- path: artifacts\inspectcode.xml - path: artifacts\inspectcode.xml
cache:
- dotnet-2.0.0.exe

66
build.cake

@ -2,7 +2,6 @@
// ADDINS // ADDINS
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#addin "nuget:?package=Polly&version=5.3.1"
#addin "nuget:?package=NuGet.Core&version=2.14.0" #addin "nuget:?package=NuGet.Core&version=2.14.0"
#tool "nuget:?package=NuGet.CommandLine&version=4.3.0" #tool "nuget:?package=NuGet.CommandLine&version=4.3.0"
#tool "nuget:?package=JetBrains.ReSharper.CommandLineTools&version=2017.1.20170613.162720" #tool "nuget:?package=JetBrains.ReSharper.CommandLineTools&version=2017.1.20170613.162720"
@ -22,7 +21,6 @@ using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using Polly;
using NuGet; using NuGet;
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -57,9 +55,8 @@ Setup<AvaloniaBuildData>(context =>
var parameters = new Parameters(context); var parameters = new Parameters(context);
var buildContext = new AvaloniaBuildData(parameters, new Packages(context, parameters)); var buildContext = new AvaloniaBuildData(parameters, new Packages(context, parameters));
Information("Building version {0} of Avalonia ({1}, {2}) using version {3} of Cake.", Information("Building version {0} of Avalonia ({1}) using version {2} of Cake.",
parameters.Version, parameters.Version,
parameters.Platform,
parameters.Configuration, parameters.Configuration,
typeof(ICakeContext).Assembly.GetName().Version.ToString()); typeof(ICakeContext).Assembly.GetName().Version.ToString());
@ -69,7 +66,6 @@ Setup<AvaloniaBuildData>(context =>
Information("Repository Branch: " + BuildSystem.AppVeyor.Environment.Repository.Branch); Information("Repository Branch: " + BuildSystem.AppVeyor.Environment.Repository.Branch);
} }
Information("Target:" + context.TargetTask.Name); Information("Target:" + context.TargetTask.Name);
Information("Platform: " + parameters.Platform);
Information("Configuration: " + parameters.Configuration); Information("Configuration: " + parameters.Configuration);
Information("IsLocalBuild: " + parameters.IsLocalBuild); Information("IsLocalBuild: " + parameters.IsLocalBuild);
Information("IsRunningOnUnix: " + parameters.IsRunningOnUnix); Information("IsRunningOnUnix: " + parameters.IsRunningOnUnix);
@ -109,32 +105,6 @@ Task("Clean-Impl")
CleanDirectory(data.Parameters.BinRoot); CleanDirectory(data.Parameters.BinRoot);
}); });
Task("Restore-NuGet-Packages-Impl")
.WithCriteria<AvaloniaBuildData>((context, data) => data.Parameters.IsRunningOnWindows)
.WithCriteria<AvaloniaBuildData>((context, data) => !data.Parameters.IsPlatformNetCoreOnly)
.Does<AvaloniaBuildData>(data =>
{
var maxRetryCount = 5;
var toolTimeout = 2d;
Policy
.Handle<Exception>()
.Retry(maxRetryCount, (exception, retryCount, context) => {
if (retryCount == maxRetryCount)
{
throw exception;
}
else
{
Verbose("{0}", exception);
toolTimeout+=0.5;
}})
.Execute(()=> {
NuGetRestore(data.Parameters.MSBuildSolution, new NuGetRestoreSettings {
ToolTimeout = TimeSpan.FromMinutes(toolTimeout)
});
});
});
void DotNetCoreBuild(Parameters parameters) void DotNetCoreBuild(Parameters parameters)
{ {
var settings = new DotNetCoreBuildSettings var settings = new DotNetCoreBuildSettings
@ -144,7 +114,6 @@ void DotNetCoreBuild(Parameters parameters)
}; };
settings.MSBuildSettings.SetConfiguration(parameters.Configuration); settings.MSBuildSettings.SetConfiguration(parameters.Configuration);
settings.MSBuildSettings.WithProperty("Platform", "\"" + parameters.Platform + "\"");
DotNetCoreBuild(parameters.MSBuildSolution, settings); DotNetCoreBuild(parameters.MSBuildSolution, settings);
} }
@ -152,17 +121,17 @@ void DotNetCoreBuild(Parameters parameters)
Task("Build-Impl") Task("Build-Impl")
.Does<AvaloniaBuildData>(data => .Does<AvaloniaBuildData>(data =>
{ {
if(data.Parameters.IsRunningOnWindows && !data.Parameters.IsPlatformNetCoreOnly) if(data.Parameters.IsRunningOnWindows)
{ {
MSBuild(data.Parameters.MSBuildSolution, settings => { MSBuild(data.Parameters.MSBuildSolution, settings => {
settings.SetConfiguration(data.Parameters.Configuration); settings.SetConfiguration(data.Parameters.Configuration);
settings.SetVerbosity(Verbosity.Minimal); settings.SetVerbosity(Verbosity.Minimal);
settings.WithProperty("Platform", "\"" + data.Parameters.Platform + "\"");
settings.WithProperty("UseRoslynPathHack", "true"); settings.WithProperty("UseRoslynPathHack", "true");
settings.UseToolVersion(MSBuildToolVersion.VS2017); settings.UseToolVersion(MSBuildToolVersion.VS2017);
settings.WithProperty("Windows", "True"); settings.WithProperty("Windows", "True");
settings.SetNodeReuse(false); settings.SetNodeReuse(false);
settings.SetMaxCpuCount(0); settings.SetMaxCpuCount(0);
settings.WithRestore();
}); });
} }
else else
@ -207,7 +176,7 @@ Task("Run-Unit-Tests-Impl")
RunCoreTest("./tests/Avalonia.Styling.UnitTests", data.Parameters, false); RunCoreTest("./tests/Avalonia.Styling.UnitTests", data.Parameters, false);
RunCoreTest("./tests/Avalonia.Visuals.UnitTests", data.Parameters, false); RunCoreTest("./tests/Avalonia.Visuals.UnitTests", data.Parameters, false);
RunCoreTest("./tests/Avalonia.Skia.UnitTests", data.Parameters, false); RunCoreTest("./tests/Avalonia.Skia.UnitTests", data.Parameters, false);
if (data.Parameters.IsRunningOnWindows && !data.Parameters.IsPlatformNetCoreOnly) if (data.Parameters.IsRunningOnWindows)
{ {
RunCoreTest("./tests/Avalonia.Direct2D1.UnitTests", data.Parameters, true); RunCoreTest("./tests/Avalonia.Direct2D1.UnitTests", data.Parameters, true);
} }
@ -223,7 +192,6 @@ Task("Run-Designer-Tests-Impl")
Task("Run-Render-Tests-Impl") Task("Run-Render-Tests-Impl")
.WithCriteria<AvaloniaBuildData>((context, data) => !data.Parameters.SkipTests) .WithCriteria<AvaloniaBuildData>((context, data) => !data.Parameters.SkipTests)
.WithCriteria<AvaloniaBuildData>((context, data) => data.Parameters.IsRunningOnWindows) .WithCriteria<AvaloniaBuildData>((context, data) => data.Parameters.IsRunningOnWindows)
.WithCriteria<AvaloniaBuildData>((context, data) => !data.Parameters.IsPlatformNetCoreOnly)
.Does<AvaloniaBuildData>(data => .Does<AvaloniaBuildData>(data =>
{ {
RunCoreTest("./tests/Avalonia.Skia.RenderTests/Avalonia.Skia.RenderTests.csproj", data.Parameters, true); RunCoreTest("./tests/Avalonia.Skia.RenderTests/Avalonia.Skia.RenderTests.csproj", data.Parameters, true);
@ -233,7 +201,6 @@ Task("Run-Render-Tests-Impl")
Task("Run-Leak-Tests-Impl") Task("Run-Leak-Tests-Impl")
.WithCriteria<AvaloniaBuildData>((context, data) => !data.Parameters.SkipTests) .WithCriteria<AvaloniaBuildData>((context, data) => !data.Parameters.SkipTests)
.WithCriteria<AvaloniaBuildData>((context, data) => data.Parameters.IsRunningOnWindows) .WithCriteria<AvaloniaBuildData>((context, data) => data.Parameters.IsRunningOnWindows)
.WithCriteria<AvaloniaBuildData>((context, data) => !data.Parameters.IsPlatformNetCoreOnly)
.Does(() => .Does(() =>
{ {
var dotMemoryUnit = Context.Tools.Resolve("dotMemoryUnit.exe"); var dotMemoryUnit = Context.Tools.Resolve("dotMemoryUnit.exe");
@ -266,15 +233,13 @@ Task("Zip-Files-Impl")
Zip(data.Parameters.NugetRoot, data.Parameters.ZipNuGetArtifacts); Zip(data.Parameters.NugetRoot, data.Parameters.ZipNuGetArtifacts);
if (!data.Parameters.IsPlatformNetCoreOnly) { Zip(data.Parameters.ZipSourceControlCatalogDesktopDirs,
Zip(data.Parameters.ZipSourceControlCatalogDesktopDirs, data.Parameters.ZipTargetControlCatalogDesktopDirs,
data.Parameters.ZipTargetControlCatalogDesktopDirs, GetFiles(data.Parameters.ZipSourceControlCatalogDesktopDirs.FullPath + "/*.dll") +
GetFiles(data.Parameters.ZipSourceControlCatalogDesktopDirs.FullPath + "/*.dll") + GetFiles(data.Parameters.ZipSourceControlCatalogDesktopDirs.FullPath + "/*.config") +
GetFiles(data.Parameters.ZipSourceControlCatalogDesktopDirs.FullPath + "/*.config") + GetFiles(data.Parameters.ZipSourceControlCatalogDesktopDirs.FullPath + "/*.so") +
GetFiles(data.Parameters.ZipSourceControlCatalogDesktopDirs.FullPath + "/*.so") + GetFiles(data.Parameters.ZipSourceControlCatalogDesktopDirs.FullPath + "/*.dylib") +
GetFiles(data.Parameters.ZipSourceControlCatalogDesktopDirs.FullPath + "/*.dylib") + GetFiles(data.Parameters.ZipSourceControlCatalogDesktopDirs.FullPath + "/*.exe"));
GetFiles(data.Parameters.ZipSourceControlCatalogDesktopDirs.FullPath + "/*.exe"));
}
}); });
Task("Create-NuGet-Packages-Impl") Task("Create-NuGet-Packages-Impl")
@ -353,7 +318,6 @@ Task("Publish-NuGet-Impl")
Task("Inspect-Impl") Task("Inspect-Impl")
.WithCriteria<AvaloniaBuildData>((context, data) => data.Parameters.IsRunningOnWindows) .WithCriteria<AvaloniaBuildData>((context, data) => data.Parameters.IsRunningOnWindows)
.WithCriteria<AvaloniaBuildData>((context, data) => !data.Parameters.IsPlatformNetCoreOnly)
.Does(() => .Does(() =>
{ {
var badIssues = new []{"PossibleNullReferenceException"}; var badIssues = new []{"PossibleNullReferenceException"};
@ -392,10 +356,12 @@ Task("Inspect-Impl")
// TARGETS // TARGETS
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
Task("Run-Tests") Task("Build")
.IsDependentOn("Clean-Impl") .IsDependentOn("Clean-Impl")
.IsDependentOn("Restore-NuGet-Packages-Impl") .IsDependentOn("Build-Impl");
.IsDependentOn("Build-Impl")
Task("Run-Tests")
.IsDependentOn("Build")
.IsDependentOn("Run-Unit-Tests-Impl") .IsDependentOn("Run-Unit-Tests-Impl")
.IsDependentOn("Run-Render-Tests-Impl") .IsDependentOn("Run-Render-Tests-Impl")
.IsDependentOn("Run-Designer-Tests-Impl") .IsDependentOn("Run-Designer-Tests-Impl")

8
build/AndroidWorkarounds.props

@ -0,0 +1,8 @@
<Project>
<ItemGroup Condition="'$(AndroidApplication)' == 'true'">
<!-- WORKAROUND: The packages below are transitively referenced by System.Memory,
but Xamarin.Android applitions needs the newest versions directly referenced for the linker. -->
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.5.1" />
<PackageReference Include="System.Buffers" Version="4.5.0" />
</ItemGroup>
</Project>

3
build/System.Memory.props

@ -1,8 +1,5 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup> <ItemGroup>
<PackageReference Include="System.Memory" Version="4.5.1" /> <PackageReference Include="System.Memory" Version="4.5.1" />
<!-- WORKAROUND: The packages below are transitively referenced by System.Memory, but Xamarin.Android needs them directly referenced for the linker. -->
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.5.1" />
<PackageReference Include="System.Buffers" Version="4.5.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

5
build/iOSWorkarounds.props

@ -0,0 +1,5 @@
<Project>
<PropertyGroup Condition="'$(UseRoslynPathHack)' == 'true'">
<CscToolPath>$(MSBuildToolsPath)\..\Roslyn</CscToolPath>
</PropertyGroup>
</Project>

21
dirs.proj

@ -0,0 +1,21 @@
<Project Sdk="Microsoft.Build.Traversal">
<ItemGroup>
<ProjectReference Include="src/**/*.*proj" />
<ProjectReference Include="samples/**/*.*proj" />
<ProjectReference Include="tests/**/*.*proj" />
<ProjectReference Remove="**/*.shproj" />
<ProjectReference Remove="src/Markup/Avalonia.Markup.Xaml/PortableXaml/**/*.*proj" />
</ItemGroup>
<ItemGroup Condition="!Exists('$(MSBuildExtensionsPath)\Xamarin\Android')">
<ProjectReference Remove="src/Android/**/*.*proj" />
<ProjectReference Remove="samples/ControlCatalog.Android/ControlCatalog.Android.csproj" />
</ItemGroup>
<ItemGroup Condition="!Exists('$(MSBuildExtensionsPath)\Xamarin\iOS')">
<ProjectReference Remove="src/iOS/**/*.*proj" />
<ProjectReference Remove="samples/ControlCatalog.iOS/ControlCatalog.iOS.csproj" />
</ItemGroup>
<ItemGroup Condition="!$([MSBuild]::IsOsPlatform('Windows')) OR '$(MSBuildRuntimeType)' != 'Full'">
<ProjectReference Remove="src/Windows/Avalonia.Win32.Interop/Avalonia.Win32.Interop.csproj" />
<ProjectReference Remove="samples/interop/**/*.*proj" />
</ItemGroup>
</Project>

5
global.json

@ -0,0 +1,5 @@
{
"msbuild-sdks": {
"Microsoft.Build.Traversal": "1.0.41"
}
}

29
packages.cake

@ -121,7 +121,6 @@ public class Packages
var SharpDXDirect3D9Version = packageVersions["SharpDX.Direct3D9"].FirstOrDefault().Item1; var SharpDXDirect3D9Version = packageVersions["SharpDX.Direct3D9"].FirstOrDefault().Item1;
var SharpDXDXGIVersion = packageVersions["SharpDX.DXGI"].FirstOrDefault().Item1; var SharpDXDXGIVersion = packageVersions["SharpDX.DXGI"].FirstOrDefault().Item1;
var SystemMemoryVersion = packageVersions["System.Memory"].FirstOrDefault().Item1; var SystemMemoryVersion = packageVersions["System.Memory"].FirstOrDefault().Item1;
var SystemComponentModeTypeConverterVersion = packageVersions["System.ComponentModel.TypeConverter"].FirstOrDefault().Item1;
context.Information("Package: Serilog, version: {0}", SerilogVersion); context.Information("Package: Serilog, version: {0}", SerilogVersion);
context.Information("Package: System.Reactive, version: {0}", SystemReactiveVersion); context.Information("Package: System.Reactive, version: {0}", SystemReactiveVersion);
@ -219,26 +218,16 @@ public class Packages
}; };
var toolHostAppNetFx = new NuSpecContent{ var toolHostAppNetFx = new NuSpecContent{
Source = ((FilePath)context.File("./src/tools/Avalonia.Designer.HostApp.NetFx/bin/" + parameters.DirSuffix + "/Avalonia.Designer.HostApp.exe")).FullPath, Source = ((FilePath)context.File("./src/tools/Avalonia.Designer.HostApp.NetFx/bin/" + parameters.DirSuffix + "/net461/Avalonia.Designer.HostApp.exe")).FullPath,
Target = "tools/net461/previewer" Target = "tools/net461/previewer"
}; };
IList<NuSpecContent> coreFiles; var toolsContent = new[] { toolHostApp, toolHostAppNetFx };
var coreFiles = coreLibrariesNuSpecContent
if (!parameters.IsPlatformNetCoreOnly) { .Concat(netFrameworkCoreLibrariesNuSpecContent).Concat(netFrameworkRuntimePlatform)
var toolsContent = new[] { toolHostApp, toolHostAppNetFx }; .Concat(netcoreappCoreLibrariesNuSpecContent).Concat(netCoreRuntimePlatform)
coreFiles = coreLibrariesNuSpecContent .Concat(toolsContent)
.Concat(win32CoreLibrariesNuSpecContent).Concat(net45RuntimePlatform) .ToList();
.Concat(netcoreappCoreLibrariesNuSpecContent).Concat(netCoreRuntimePlatform)
.Concat(toolsContent)
.ToList();
} else {
var toolsContent = new[] { toolHostApp };
coreFiles = coreLibrariesNuSpecContent
.Concat(netcoreappCoreLibrariesNuSpecContent).Concat(netCoreRuntimePlatform)
.Concat(toolsContent)
.ToList();
}
var nuspecNuGetSettingsCore = new [] var nuspecNuGetSettingsCore = new []
{ {
@ -254,7 +243,7 @@ public class Packages
new NuSpecDependency() { Id = "Avalonia.Remote.Protocol", Version = parameters.Version, TargetFramework="netcoreapp2.0" }, new NuSpecDependency() { Id = "Avalonia.Remote.Protocol", Version = parameters.Version, TargetFramework="netcoreapp2.0" },
new NuSpecDependency() { Id = "Avalonia.Remote.Protocol", Version = parameters.Version, TargetFramework="net461" }, new NuSpecDependency() { Id = "Avalonia.Remote.Protocol", Version = parameters.Version, TargetFramework="net461" },
new NuSpecDependency() { Id = "System.ValueTuple", Version = SystemValueTupleVersion, TargetFramework="net461" }, new NuSpecDependency() { Id = "System.ValueTuple", Version = SystemValueTupleVersion, TargetFramework="net461" },
new NuSpecDependency() { Id = "System.ComponentModel.TypeConverter", Version = SystemComponentModeTypeConverterVersion, TargetFramework="net461" }, new NuSpecDependency() { Id = "System.ComponentModel.TypeConverter", Version = "4.3.0", TargetFramework="net461" },
new NuSpecDependency() { Id = "NETStandard.Library", Version = "2.0.0", TargetFramework="net461"} new NuSpecDependency() { Id = "NETStandard.Library", Version = "2.0.0", TargetFramework="net461"}
} }
.Deps(new string[]{"netstandard2.0", "netcoreapp2.0", "net461"}, .Deps(new string[]{"netstandard2.0", "netcoreapp2.0", "net461"},
@ -511,7 +500,7 @@ public class Packages
NuspecNuGetSettings.AddRange(nuspecNuGetSettingsCore); NuspecNuGetSettings.AddRange(nuspecNuGetSettingsCore);
NuspecNuGetSettings.AddRange(nuspecNuGetSettingsDesktop); NuspecNuGetSettings.AddRange(nuspecNuGetSettingsDesktop);
if (!parameters.IsPlatformNetCoreOnly) { if (parameters.IsRunningOnWindows) {
NuspecNuGetSettings.Add(nuspecNuGetSettingInterop); NuspecNuGetSettings.Add(nuspecNuGetSettingInterop);
NuspecNuGetSettings.AddRange(nuspecNuGetSettingsMobile); NuspecNuGetSettings.AddRange(nuspecNuGetSettingsMobile);
} }

16
parameters.cake

@ -1,6 +1,5 @@
public class Parameters public class Parameters
{ {
public string Platform { get; private set; }
public string Configuration { get; private set; } public string Configuration { get; private set; }
public bool SkipTests { get; private set; } public bool SkipTests { get; private set; }
public string MainRepo { get; private set; } public string MainRepo { get; private set; }
@ -9,10 +8,6 @@ public class Parameters
public string ReleasePlatform { get; private set; } public string ReleasePlatform { get; private set; }
public string ReleaseConfiguration { get; private set; } public string ReleaseConfiguration { get; private set; }
public string MSBuildSolution { get; private set; } public string MSBuildSolution { get; private set; }
public bool IsPlatformAnyCPU { get; private set; }
public bool IsPlatformX86 { get; private set; }
public bool IsPlatformX64 { get; private set; }
public bool IsPlatformNetCoreOnly { get; private set; }
public bool IsLocalBuild { get; private set; } public bool IsLocalBuild { get; private set; }
public bool IsRunningOnUnix { get; private set; } public bool IsRunningOnUnix { get; private set; }
public bool IsRunningOnWindows { get; private set; } public bool IsRunningOnWindows { get; private set; }
@ -43,7 +38,6 @@ public class Parameters
var buildSystem = context.BuildSystem(); var buildSystem = context.BuildSystem();
// ARGUMENTS // ARGUMENTS
Platform = context.Argument("platform", "Any CPU");
Configuration = context.Argument("configuration", "Release"); Configuration = context.Argument("configuration", "Release");
SkipTests = context.HasArgument("skip-tests"); SkipTests = context.HasArgument("skip-tests");
@ -51,15 +45,10 @@ public class Parameters
MainRepo = "AvaloniaUI/Avalonia"; MainRepo = "AvaloniaUI/Avalonia";
MasterBranch = "master"; MasterBranch = "master";
AssemblyInfoPath = context.File("./src/Shared/SharedAssemblyInfo.cs"); AssemblyInfoPath = context.File("./src/Shared/SharedAssemblyInfo.cs");
ReleasePlatform = "Any CPU";
ReleaseConfiguration = "Release"; ReleaseConfiguration = "Release";
MSBuildSolution = "./Avalonia.sln"; MSBuildSolution = "./dirs.proj";
// PARAMETERS // PARAMETERS
IsPlatformAnyCPU = StringComparer.OrdinalIgnoreCase.Equals(Platform, "Any CPU");
IsPlatformX86 = StringComparer.OrdinalIgnoreCase.Equals(Platform, "x86");
IsPlatformX64 = StringComparer.OrdinalIgnoreCase.Equals(Platform, "x64");
IsPlatformNetCoreOnly = StringComparer.OrdinalIgnoreCase.Equals(Platform, "NetCoreOnly");
IsLocalBuild = buildSystem.IsLocalBuild; IsLocalBuild = buildSystem.IsLocalBuild;
IsRunningOnUnix = context.IsRunningOnUnix(); IsRunningOnUnix = context.IsRunningOnUnix();
IsRunningOnWindows = context.IsRunningOnWindows(); IsRunningOnWindows = context.IsRunningOnWindows();
@ -69,8 +58,7 @@ public class Parameters
IsMasterBranch = StringComparer.OrdinalIgnoreCase.Equals(MasterBranch, buildSystem.AppVeyor.Environment.Repository.Branch); IsMasterBranch = StringComparer.OrdinalIgnoreCase.Equals(MasterBranch, buildSystem.AppVeyor.Environment.Repository.Branch);
IsTagged = buildSystem.AppVeyor.Environment.Repository.Tag.IsTag IsTagged = buildSystem.AppVeyor.Environment.Repository.Tag.IsTag
&& !string.IsNullOrWhiteSpace(buildSystem.AppVeyor.Environment.Repository.Tag.Name); && !string.IsNullOrWhiteSpace(buildSystem.AppVeyor.Environment.Repository.Tag.Name);
IsReleasable = StringComparer.OrdinalIgnoreCase.Equals(ReleasePlatform, Platform) IsReleasable = StringComparer.OrdinalIgnoreCase.Equals(ReleaseConfiguration, Configuration);
&& StringComparer.OrdinalIgnoreCase.Equals(ReleaseConfiguration, Configuration);
IsMyGetRelease = !IsTagged && IsReleasable; IsMyGetRelease = !IsTagged && IsReleasable;
// VERSION // VERSION

3
samples/ControlCatalog.Android/ControlCatalog.Android.csproj

@ -154,4 +154,5 @@
</ItemGroup> </ItemGroup>
<Import Project="..\..\build\Rx.props" /> <Import Project="..\..\build\Rx.props" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" /> <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
</Project> <Import Project="..\..\build\AndroidWorkarounds.props" />
</Project>

1
samples/ControlCatalog.iOS/ControlCatalog.iOS.csproj

@ -175,4 +175,5 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" /> <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<Import Project="..\..\build\iOSWorkarounds.props" />
</Project> </Project>

3
src/Android/Avalonia.Android/Avalonia.Android.csproj

@ -133,4 +133,5 @@
<Import Project="..\..\Shared\PlatformSupport\PlatformSupport.projitems" Label="Shared" /> <Import Project="..\..\Shared\PlatformSupport\PlatformSupport.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" /> <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<Import Project="..\..\..\build\Rx.props" /> <Import Project="..\..\..\build\Rx.props" />
</Project> <Import Project="..\..\..\build\AndroidWorkarounds.props" />
</Project>

3
src/Android/Avalonia.AndroidTestApplication/Avalonia.AndroidTestApplication.csproj

@ -152,4 +152,5 @@
<Import Project="..\..\..\build\Serilog.props" /> <Import Project="..\..\..\build\Serilog.props" />
<Import Project="..\..\..\build\Rx.props" /> <Import Project="..\..\..\build\Rx.props" />
<Import Project="..\..\..\build\System.Memory.props" /> <Import Project="..\..\..\build\System.Memory.props" />
</Project> <Import Project="..\..\..\build\AndroidWorkarounds.props" />
</Project>

8
src/iOS/Avalonia.iOS/Avalonia.iOS.csproj

@ -2,7 +2,7 @@
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion> <ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{4488AD85-1495-4809-9AA4-DDFE0A48527E}</ProjectGuid> <ProjectGuid>{4488AD85-1495-4809-9AA4-DDFE0A48527E}</ProjectGuid>
@ -108,7 +108,5 @@
<Import Project="..\..\Shared\PlatformSupport\PlatformSupport.projitems" Label="Shared" /> <Import Project="..\..\Shared\PlatformSupport\PlatformSupport.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" /> <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<Import Project="..\..\..\build\Rx.props" /> <Import Project="..\..\..\build\Rx.props" />
<PropertyGroup Condition="'$(UseRoslynPathHack)' == 'true'"> <Import Project="..\..\..\build\iOSWorkarounds.props" />
<CscToolPath>$(MSBuildToolsPath)\..\Roslyn</CscToolPath> </Project>
</PropertyGroup>
</Project>

3
src/iOS/Avalonia.iOSTestApplication/Avalonia.iOSTestApplication.csproj

@ -186,4 +186,5 @@
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" /> <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<Import Project="..\..\..\build\Rx.props" /> <Import Project="..\..\..\build\Rx.props" />
</Project> <Import Project="..\..\..\build\iOSWorkarounds.props" />
</Project>

125
src/tools/Avalonia.Designer.HostApp.NetFX/Avalonia.Designer.HostApp.NetFX.csproj

@ -1,111 +1,24 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <OutputType>Exe</OutputType>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <TargetFrameworks>net461</TargetFrameworks>
<ProjectGuid>{4ADA61C8-D191-428D-9066-EF4F0D86520F}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Avalonia.Designer.HostApp</RootNamespace>
<AssemblyName>Avalonia.Designer.HostApp</AssemblyName> <AssemblyName>Avalonia.Designer.HostApp</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\Avalonia.DesignerSupport\Avalonia.DesignerSupport.csproj"> <ProjectReference Include="..\..\Avalonia.DesignerSupport\Avalonia.DesignerSupport.csproj" />
<Project>{799a7bb5-3c2c-48b6-85a7-406a12c420da}</Project> <ProjectReference Include="..\..\Markup\Avalonia.Markup.Xaml\Avalonia.Markup.Xaml.csproj" />
<Name>Avalonia.DesignerSupport</Name> <ProjectReference Include="..\..\Markup\Avalonia.Markup\Avalonia.Markup.csproj" />
</ProjectReference> <ProjectReference Include="..\..\Avalonia.Animation\Avalonia.Animation.csproj" />
<ProjectReference Include="..\..\Avalonia.DotNetFrameworkRuntime\Avalonia.DotNetFrameworkRuntime.csproj"> <ProjectReference Include="..\..\Avalonia.Base\Avalonia.Base.csproj" />
<Project>{4A1ABB09-9047-4BD5-A4AD-A055E52C5EE0}</Project> <ProjectReference Include="..\..\Avalonia.Controls\Avalonia.Controls.csproj" />
<Name>Avalonia.DotNetFrameworkRuntime</Name> <ProjectReference Include="..\..\Avalonia.Diagnostics\Avalonia.Diagnostics.csproj" />
</ProjectReference> <ProjectReference Include="..\..\Avalonia.Input\Avalonia.Input.csproj" />
<ProjectReference Include="..\..\Markup\Avalonia.Markup.Xaml\Avalonia.Markup.Xaml.csproj"> <ProjectReference Include="..\..\Avalonia.Interactivity\Avalonia.Interactivity.csproj" />
<Project>{3E53A01A-B331-47F3-B828-4A5717E77A24}</Project> <ProjectReference Include="..\..\Avalonia.Layout\Avalonia.Layout.csproj" />
<Name>Avalonia.Markup.Xaml</Name> <ProjectReference Include="..\..\Avalonia.ReactiveUI\Avalonia.ReactiveUI.csproj" />
</ProjectReference> <ProjectReference Include="..\..\Avalonia.Visuals\Avalonia.Visuals.csproj" />
<ProjectReference Include="..\..\Markup\Avalonia.Markup\Avalonia.Markup.csproj"> <ProjectReference Include="..\..\Avalonia.Styling\Avalonia.Styling.csproj" />
<Project>{6417E941-21BC-467B-A771-0DE389353CE6}</Project> <ProjectReference Include="..\..\Avalonia.Themes.Default\Avalonia.Themes.Default.csproj" />
<Name>Avalonia.Markup</Name> <ProjectReference Include="..\..\..\samples\ControlCatalog.Desktop\ControlCatalog.Desktop.csproj" />
</ProjectReference>
<ProjectReference Include="..\..\Avalonia.Animation\Avalonia.Animation.csproj">
<Project>{d211e587-d8bc-45b9-95a4-f297c8fa5200}</Project>
<Name>Avalonia.Animation</Name>
</ProjectReference>
<ProjectReference Include="..\..\Avalonia.Base\Avalonia.Base.csproj">
<Project>{B09B78D8-9B26-48B0-9149-D64A2F120F3F}</Project>
<Name>Avalonia.Base</Name>
</ProjectReference>
<ProjectReference Include="..\..\Avalonia.Controls\Avalonia.Controls.csproj">
<Project>{D2221C82-4A25-4583-9B43-D791E3F6820C}</Project>
<Name>Avalonia.Controls</Name>
</ProjectReference>
<ProjectReference Include="..\..\Avalonia.Input\Avalonia.Input.csproj">
<Project>{62024b2d-53eb-4638-b26b-85eeaa54866e}</Project>
<Name>Avalonia.Input</Name>
</ProjectReference>
<ProjectReference Include="..\..\Avalonia.Interactivity\Avalonia.Interactivity.csproj">
<Project>{6b0ed19d-a08b-461c-a9d9-a9ee40b0c06b}</Project>
<Name>Avalonia.Interactivity</Name>
</ProjectReference>
<ProjectReference Include="..\..\Avalonia.Layout\Avalonia.Layout.csproj">
<Project>{42472427-4774-4c81-8aff-9f27b8e31721}</Project>
<Name>Avalonia.Layout</Name>
</ProjectReference>
<ProjectReference Include="..\..\Avalonia.Logging.Serilog\Avalonia.Logging.Serilog.csproj">
<Project>{B61B66A3-B82D-4875-8001-89D3394FE0C9}</Project>
<Name>Avalonia.Logging.Serilog</Name>
</ProjectReference>
<ProjectReference Include="..\..\Avalonia.Visuals\Avalonia.Visuals.csproj">
<Project>{eb582467-6abb-43a1-b052-e981ba910e3a}</Project>
<Name>Avalonia.Visuals</Name>
</ProjectReference>
<ProjectReference Include="..\..\Avalonia.Styling\Avalonia.Styling.csproj">
<Project>{F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}</Project>
<Name>Avalonia.Styling</Name>
</ProjectReference>
<ProjectReference Include="..\..\Avalonia.Themes.Default\Avalonia.Themes.Default.csproj">
<Project>{3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}</Project>
<Name>Avalonia.Themes.Default</Name>
</ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> </Project>
</Project>

Loading…
Cancel
Save