From e028f39ae0c89192579f474d5a25308141567963 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Sat, 5 Aug 2017 18:40:15 -0700 Subject: [PATCH 1/9] Upgrade ReactiveUI to the v8 alpha nuget package so we don't need to maintain our own fork. Avalonia.ReactiveUI only registers the MainScheduler, and it does so via a call to UseReactiveUI on AppBuilder. --- .../AppBuilderExtensions.cs | 24 +++++++ .../Avalonia.ReactiveUI.csproj | 71 +------------------ .../Properties/AssemblyInfo.cs | 27 ------- src/Avalonia.ReactiveUI/Registrations.cs | 23 ------ src/Avalonia.ReactiveUI/Shims.cs | 34 --------- src/Avalonia.ReactiveUI/src | 1 - 6 files changed, 26 insertions(+), 154 deletions(-) create mode 100644 src/Avalonia.ReactiveUI/AppBuilderExtensions.cs delete mode 100644 src/Avalonia.ReactiveUI/Registrations.cs delete mode 100644 src/Avalonia.ReactiveUI/Shims.cs delete mode 160000 src/Avalonia.ReactiveUI/src diff --git a/src/Avalonia.ReactiveUI/AppBuilderExtensions.cs b/src/Avalonia.ReactiveUI/AppBuilderExtensions.cs new file mode 100644 index 0000000000..e081763e99 --- /dev/null +++ b/src/Avalonia.ReactiveUI/AppBuilderExtensions.cs @@ -0,0 +1,24 @@ +// Copyright (c) The Avalonia Project. All rights reserved. +// Licensed under the MIT license. See licence.md file in the project root for full license information. + +using Avalonia.Controls; +using Avalonia.Threading; +using ReactiveUI; +using System; +using System.Reactive.Concurrency; +using System.Threading; + +namespace Avalonia +{ + public static class AppBuilderExtensions + { + public static TAppBuilder UseReactiveUI(this TAppBuilder builder) + where TAppBuilder : AppBuilderBase, new() + { + return builder.AfterSetup(_ => + { + RxApp.MainThreadScheduler = AvaloniaScheduler.Instance; + }); + } + } +} diff --git a/src/Avalonia.ReactiveUI/Avalonia.ReactiveUI.csproj b/src/Avalonia.ReactiveUI/Avalonia.ReactiveUI.csproj index 2d66b62eab..3fc8faa06d 100644 --- a/src/Avalonia.ReactiveUI/Avalonia.ReactiveUI.csproj +++ b/src/Avalonia.ReactiveUI/Avalonia.ReactiveUI.csproj @@ -1,80 +1,13 @@  netstandard1.3 - False false - - true - full - false - bin\Debug\ - TRACE;DEBUG;MONO PORTABLE;NETSTANDARD1_1 - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE;MONO PORTABLE;RELEASE;NETSTANDARD1_1 - prompt - 4 - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/src/Avalonia.ReactiveUI/Properties/AssemblyInfo.cs b/src/Avalonia.ReactiveUI/Properties/AssemblyInfo.cs index 358c6224fb..c9ead6f6e6 100644 --- a/src/Avalonia.ReactiveUI/Properties/AssemblyInfo.cs +++ b/src/Avalonia.ReactiveUI/Properties/AssemblyInfo.cs @@ -1,33 +1,6 @@ // Copyright (c) The Avalonia Project. All rights reserved. // Licensed under the MIT license. See licence.md file in the project root for full license information. -using System.Resources; using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. [assembly: AssemblyTitle("Avalonia.ReactiveUI")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Avalonia.ReactiveUI")] -[assembly: AssemblyCopyright("Copyright \u00A9 2015")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: NeutralResourcesLanguage("en")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/Avalonia.ReactiveUI/Registrations.cs b/src/Avalonia.ReactiveUI/Registrations.cs deleted file mode 100644 index 066aa46dc1..0000000000 --- a/src/Avalonia.ReactiveUI/Registrations.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) The Avalonia Project. All rights reserved. -// Licensed under the MIT license. See licence.md file in the project root for full license information. - -using System; -using System.Reactive.Concurrency; -using System.Threading; - - -namespace ReactiveUI -{ - /// - /// Ignore me. This class is a secret handshake between RxUI and RxUI.Xaml - /// in order to register certain classes on startup that would be difficult - /// to register otherwise. - /// - public class PlatformRegistrations : IWantsToRegisterStuff - { - public void Register(Action, Type> registerFunction) - { - RxApp.MainThreadScheduler = new SynchronizationContextScheduler(SynchronizationContext.Current); - } - } -} diff --git a/src/Avalonia.ReactiveUI/Shims.cs b/src/Avalonia.ReactiveUI/Shims.cs deleted file mode 100644 index 2729a68d6f..0000000000 --- a/src/Avalonia.ReactiveUI/Shims.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace System.Runtime.Serialization -{ - class IgnoreDataMemberAttribute : Attribute - { - } - - class DataMemberAttribute : Attribute - { - } - class OnDeserializedAttribute : Attribute - { - } - - class DataContractAttribute : Attribute - { - } - - class StreamingContext { } -} - -namespace System.Diagnostics.Contracts -{ - static class Contract - { - public static void Requires(bool condition) - { - - } - } -} diff --git a/src/Avalonia.ReactiveUI/src b/src/Avalonia.ReactiveUI/src deleted file mode 160000 index 3f725c808b..0000000000 --- a/src/Avalonia.ReactiveUI/src +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3f725c808b1d4c8457f0d3204e0a071aa462cd75 From d4d7cd24fd8db511ccd010e8c7eeb87b9b23919f Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Sat, 5 Aug 2017 18:40:45 -0700 Subject: [PATCH 2/9] Update Rx.Net dependency to match reactiveui's dependency on Rx. --- build/Rx.props | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/build/Rx.props b/build/Rx.props index 5d74a6b214..e63055da3e 100644 --- a/build/Rx.props +++ b/build/Rx.props @@ -1,11 +1,11 @@  - - - - - - - + + + + + + + From e5449020f39a0b9d8180db7515a547a3a9d8ff2e Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Sat, 5 Aug 2017 18:41:04 -0700 Subject: [PATCH 3/9] Removed ReactiveUI dependeny in BindingTests. --- .../Avalonia.Markup.Xaml.UnitTests.csproj | 1 - .../Data/BindingTests.cs | 18 ++++++++++++++--- .../Data/BindingTests_Source.cs | 20 +++++++++++++++---- 3 files changed, 31 insertions(+), 8 deletions(-) diff --git a/tests/Avalonia.Markup.Xaml.UnitTests/Avalonia.Markup.Xaml.UnitTests.csproj b/tests/Avalonia.Markup.Xaml.UnitTests/Avalonia.Markup.Xaml.UnitTests.csproj index f6f8f6bcb0..48f8c6f396 100644 --- a/tests/Avalonia.Markup.Xaml.UnitTests/Avalonia.Markup.Xaml.UnitTests.csproj +++ b/tests/Avalonia.Markup.Xaml.UnitTests/Avalonia.Markup.Xaml.UnitTests.csproj @@ -19,7 +19,6 @@ - diff --git a/tests/Avalonia.Markup.Xaml.UnitTests/Data/BindingTests.cs b/tests/Avalonia.Markup.Xaml.UnitTests/Data/BindingTests.cs index 210ad2ab0b..5028facc78 100644 --- a/tests/Avalonia.Markup.Xaml.UnitTests/Data/BindingTests.cs +++ b/tests/Avalonia.Markup.Xaml.UnitTests/Data/BindingTests.cs @@ -10,8 +10,9 @@ using Avalonia.Data; using Avalonia.Markup.Data; using Avalonia.Markup.Xaml.Data; using Moq; -using ReactiveUI; using Xunit; +using System.ComponentModel; +using System.Runtime.CompilerServices; namespace Avalonia.Markup.Xaml.UnitTests.Data { @@ -350,14 +351,25 @@ namespace Avalonia.Markup.Xaml.UnitTests.Data } } - public class Source : ReactiveObject + public class Source : INotifyPropertyChanged { private string _foo; public string Foo { get { return _foo; } - set { this.RaiseAndSetIfChanged(ref _foo, value); } + set + { + _foo = Foo; + RaisePropertyChanged(); + } + } + + public event PropertyChangedEventHandler PropertyChanged; + + private void RaisePropertyChanged([CallerMemberName] string prop = "") + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(prop)); } } diff --git a/tests/Avalonia.Markup.Xaml.UnitTests/Data/BindingTests_Source.cs b/tests/Avalonia.Markup.Xaml.UnitTests/Data/BindingTests_Source.cs index 778a93d326..18a6c405f1 100644 --- a/tests/Avalonia.Markup.Xaml.UnitTests/Data/BindingTests_Source.cs +++ b/tests/Avalonia.Markup.Xaml.UnitTests/Data/BindingTests_Source.cs @@ -6,8 +6,9 @@ using Avalonia.Controls; using Avalonia.Data; using Avalonia.Markup.Data; using Avalonia.Markup.Xaml.Data; -using ReactiveUI; using Xunit; +using System.ComponentModel; +using System.Runtime.CompilerServices; namespace Avalonia.Markup.Xaml.UnitTests.Data { @@ -24,15 +25,26 @@ namespace Avalonia.Markup.Xaml.UnitTests.Data Assert.Equal(target.Text, "foo"); } - - public class Source : ReactiveObject + + public class Source : INotifyPropertyChanged { private string _foo; public string Foo { get { return _foo; } - set { this.RaiseAndSetIfChanged(ref _foo, value); } + set + { + _foo = Foo; + RaisePropertyChanged(); + } + } + + public event PropertyChangedEventHandler PropertyChanged; + + private void RaisePropertyChanged([CallerMemberName] string prop = "") + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(prop)); } } } From 35c82ecac5c8d8e3099611b1222bf6c5c145b097 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Sat, 5 Aug 2017 18:41:21 -0700 Subject: [PATCH 4/9] Updated BindingTest sample to use the new reactiveui APIs. --- samples/BindingTest/App.xaml.cs | 1 + samples/BindingTest/BindingTest.csproj | 1 - samples/BindingTest/ViewModels/MainWindowViewModel.cs | 10 ++++------ 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/samples/BindingTest/App.xaml.cs b/samples/BindingTest/App.xaml.cs index 7bcaf837a8..42e5716541 100644 --- a/samples/BindingTest/App.xaml.cs +++ b/samples/BindingTest/App.xaml.cs @@ -20,6 +20,7 @@ namespace BindingTest AppBuilder.Configure() .UsePlatformDetect() + .UseReactiveUI() .Start(); } diff --git a/samples/BindingTest/BindingTest.csproj b/samples/BindingTest/BindingTest.csproj index 8e78b0c2cd..53daf32a78 100644 --- a/samples/BindingTest/BindingTest.csproj +++ b/samples/BindingTest/BindingTest.csproj @@ -45,7 +45,6 @@ - diff --git a/samples/BindingTest/ViewModels/MainWindowViewModel.cs b/samples/BindingTest/ViewModels/MainWindowViewModel.cs index 2ec052c258..49e8d170f7 100644 --- a/samples/BindingTest/ViewModels/MainWindowViewModel.cs +++ b/samples/BindingTest/ViewModels/MainWindowViewModel.cs @@ -27,15 +27,13 @@ namespace BindingTest.ViewModels SelectedItems = new ObservableCollection(); - ShuffleItems = ReactiveCommand.Create(); - ShuffleItems.Subscribe(_ => + ShuffleItems = ReactiveCommand.Create(() => { var r = new Random(); Items.Move(r.Next(Items.Count), 1); }); - StringValueCommand = ReactiveCommand.Create(); - StringValueCommand.Subscribe(param => + StringValueCommand = ReactiveCommand.Create(param => { BooleanFlag = !BooleanFlag; StringValue = param.ToString(); @@ -56,7 +54,7 @@ namespace BindingTest.ViewModels public ObservableCollection Items { get; } public ObservableCollection SelectedItems { get; } - public ReactiveCommand ShuffleItems { get; } + public ReactiveCommand ShuffleItems { get; } public string BooleanString { @@ -89,7 +87,7 @@ namespace BindingTest.ViewModels } public IObservable CurrentTimeObservable { get; } - public ReactiveCommand StringValueCommand { get; } + public ReactiveCommand StringValueCommand { get; } public DataAnnotationsErrorViewModel DataAnnotationsValidation { get; } = new DataAnnotationsErrorViewModel(); public ExceptionErrorViewModel ExceptionDataValidation { get; } = new ExceptionErrorViewModel(); From 9f8336c733b99f32a696f077996c84da1ca1d9d1 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Sat, 5 Aug 2017 19:04:28 -0700 Subject: [PATCH 5/9] Update samples to use current ReactiveUI APIs. --- Avalonia.sln | 3 ++- build/ReactiveUI.props | 5 ++++ samples/BindingTest/BindingTest.csproj | 1 + samples/RenderTest/Program.cs | 1 + samples/RenderTest/RenderTest.csproj | 1 + .../ViewModels/MainWindowViewModel.cs | 10 +++----- samples/VirtualizationTest/Program.cs | 1 + .../ViewModels/MainWindowViewModel.cs | 25 ++++++++----------- .../VirtualizationTest.csproj | 1 + .../Avalonia.ReactiveUI.csproj | 4 +-- 10 files changed, 27 insertions(+), 25 deletions(-) create mode 100644 build/ReactiveUI.props diff --git a/Avalonia.sln b/Avalonia.sln index afaee6a907..7fdc0bc932 100644 --- a/Avalonia.sln +++ b/Avalonia.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26228.4 +VisualStudioVersion = 15.0.26430.16 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Base", "src\Avalonia.Base\Avalonia.Base.csproj", "{B09B78D8-9B26-48B0-9149-D64A2F120F3F}" EndProject @@ -169,6 +169,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Props", "Props", "{F3AC8BC1 build\Microsoft.Reactive.Testing.props = build\Microsoft.Reactive.Testing.props build\Moq.props = build\Moq.props build\NetCore.props = build\NetCore.props + build\ReactiveUI.props = build\ReactiveUI.props build\Rx.props = build\Rx.props build\Serilog.props = build\Serilog.props build\Serilog.Sinks.Trace.props = build\Serilog.Sinks.Trace.props diff --git a/build/ReactiveUI.props b/build/ReactiveUI.props new file mode 100644 index 0000000000..4473447647 --- /dev/null +++ b/build/ReactiveUI.props @@ -0,0 +1,5 @@ + + + + + diff --git a/samples/BindingTest/BindingTest.csproj b/samples/BindingTest/BindingTest.csproj index 53daf32a78..f13872c0bd 100644 --- a/samples/BindingTest/BindingTest.csproj +++ b/samples/BindingTest/BindingTest.csproj @@ -161,4 +161,5 @@ + \ No newline at end of file diff --git a/samples/RenderTest/Program.cs b/samples/RenderTest/Program.cs index 7a23e09dd4..514771097f 100644 --- a/samples/RenderTest/Program.cs +++ b/samples/RenderTest/Program.cs @@ -18,6 +18,7 @@ namespace RenderTest // again. AppBuilder.Configure() .UsePlatformDetect() + .UseReactiveUI() .Start(); } diff --git a/samples/RenderTest/RenderTest.csproj b/samples/RenderTest/RenderTest.csproj index 95f1479b6b..3b4602a740 100644 --- a/samples/RenderTest/RenderTest.csproj +++ b/samples/RenderTest/RenderTest.csproj @@ -183,4 +183,5 @@ + \ No newline at end of file diff --git a/samples/RenderTest/ViewModels/MainWindowViewModel.cs b/samples/RenderTest/ViewModels/MainWindowViewModel.cs index bd68752f66..b2fa2e8b7a 100644 --- a/samples/RenderTest/ViewModels/MainWindowViewModel.cs +++ b/samples/RenderTest/ViewModels/MainWindowViewModel.cs @@ -10,10 +10,8 @@ namespace RenderTest.ViewModels public MainWindowViewModel() { - ToggleDrawDirtyRects = ReactiveCommand.Create(); - ToggleDrawDirtyRects.Subscribe(_ => DrawDirtyRects = !DrawDirtyRects); - ToggleDrawFps = ReactiveCommand.Create(); - ToggleDrawFps.Subscribe(_ => DrawFps = !DrawFps); + ToggleDrawDirtyRects = ReactiveCommand.Create(() => DrawDirtyRects = !DrawDirtyRects); + ToggleDrawFps = ReactiveCommand.Create(() => DrawFps = !DrawFps); } public bool DrawDirtyRects @@ -28,7 +26,7 @@ namespace RenderTest.ViewModels set { this.RaiseAndSetIfChanged(ref drawFps, value); } } - public ReactiveCommand ToggleDrawDirtyRects { get; } - public ReactiveCommand ToggleDrawFps { get; } + public ReactiveCommand ToggleDrawDirtyRects { get; } + public ReactiveCommand ToggleDrawFps { get; } } } diff --git a/samples/VirtualizationTest/Program.cs b/samples/VirtualizationTest/Program.cs index d5649f6a06..e9156d803f 100644 --- a/samples/VirtualizationTest/Program.cs +++ b/samples/VirtualizationTest/Program.cs @@ -17,6 +17,7 @@ namespace VirtualizationTest AppBuilder.Configure() .UsePlatformDetect() + .UseReactiveUI() .Start(); } diff --git a/samples/VirtualizationTest/ViewModels/MainWindowViewModel.cs b/samples/VirtualizationTest/ViewModels/MainWindowViewModel.cs index 86869eb46a..a0e1570a36 100644 --- a/samples/VirtualizationTest/ViewModels/MainWindowViewModel.cs +++ b/samples/VirtualizationTest/ViewModels/MainWindowViewModel.cs @@ -23,20 +23,15 @@ namespace VirtualizationTest.ViewModels public MainWindowViewModel() { this.WhenAnyValue(x => x.ItemCount).Subscribe(ResizeItems); - RecreateCommand = ReactiveCommand.Create(); - RecreateCommand.Subscribe(_ => Recreate()); + RecreateCommand = ReactiveCommand.Create(() => Recreate()); - AddItemCommand = ReactiveCommand.Create(); - AddItemCommand.Subscribe(_ => AddItem()); + AddItemCommand = ReactiveCommand.Create(() => AddItem()); - RemoveItemCommand = ReactiveCommand.Create(); - RemoveItemCommand.Subscribe(_ => Remove()); + RemoveItemCommand = ReactiveCommand.Create(() => Remove()); - SelectFirstCommand = ReactiveCommand.Create(); - SelectFirstCommand.Subscribe(_ => SelectItem(0)); + SelectFirstCommand = ReactiveCommand.Create(() => SelectItem(0)); - SelectLastCommand = ReactiveCommand.Create(); - SelectLastCommand.Subscribe(_ => SelectItem(Items.Count - 1)); + SelectLastCommand = ReactiveCommand.Create(() => SelectItem(Items.Count - 1)); } public string NewItemString @@ -78,11 +73,11 @@ namespace VirtualizationTest.ViewModels public IEnumerable VirtualizationModes => Enum.GetValues(typeof(ItemVirtualizationMode)).Cast(); - public ReactiveCommand AddItemCommand { get; private set; } - public ReactiveCommand RecreateCommand { get; private set; } - public ReactiveCommand RemoveItemCommand { get; private set; } - public ReactiveCommand SelectFirstCommand { get; private set; } - public ReactiveCommand SelectLastCommand { get; private set; } + public ReactiveCommand AddItemCommand { get; private set; } + public ReactiveCommand RecreateCommand { get; private set; } + public ReactiveCommand RemoveItemCommand { get; private set; } + public ReactiveCommand SelectFirstCommand { get; private set; } + public ReactiveCommand SelectLastCommand { get; private set; } private void ResizeItems(int count) { diff --git a/samples/VirtualizationTest/VirtualizationTest.csproj b/samples/VirtualizationTest/VirtualizationTest.csproj index 327e659966..9d31a6cb86 100644 --- a/samples/VirtualizationTest/VirtualizationTest.csproj +++ b/samples/VirtualizationTest/VirtualizationTest.csproj @@ -158,4 +158,5 @@ + \ No newline at end of file diff --git a/src/Avalonia.ReactiveUI/Avalonia.ReactiveUI.csproj b/src/Avalonia.ReactiveUI/Avalonia.ReactiveUI.csproj index 3fc8faa06d..6d547d9eb0 100644 --- a/src/Avalonia.ReactiveUI/Avalonia.ReactiveUI.csproj +++ b/src/Avalonia.ReactiveUI/Avalonia.ReactiveUI.csproj @@ -6,9 +6,6 @@ - - - @@ -20,5 +17,6 @@ + \ No newline at end of file From 74865bc601449b517cc9bca4d8153d67bbf589a6 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Sat, 5 Aug 2017 19:54:01 -0700 Subject: [PATCH 6/9] Fixed bug I introduced into tests. --- tests/Avalonia.Markup.Xaml.UnitTests/Data/BindingTests.cs | 2 +- .../Avalonia.Markup.Xaml.UnitTests/Data/BindingTests_Source.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Avalonia.Markup.Xaml.UnitTests/Data/BindingTests.cs b/tests/Avalonia.Markup.Xaml.UnitTests/Data/BindingTests.cs index 5028facc78..f5f9f9f2f6 100644 --- a/tests/Avalonia.Markup.Xaml.UnitTests/Data/BindingTests.cs +++ b/tests/Avalonia.Markup.Xaml.UnitTests/Data/BindingTests.cs @@ -360,7 +360,7 @@ namespace Avalonia.Markup.Xaml.UnitTests.Data get { return _foo; } set { - _foo = Foo; + _foo = value; RaisePropertyChanged(); } } diff --git a/tests/Avalonia.Markup.Xaml.UnitTests/Data/BindingTests_Source.cs b/tests/Avalonia.Markup.Xaml.UnitTests/Data/BindingTests_Source.cs index 18a6c405f1..c6006f3afb 100644 --- a/tests/Avalonia.Markup.Xaml.UnitTests/Data/BindingTests_Source.cs +++ b/tests/Avalonia.Markup.Xaml.UnitTests/Data/BindingTests_Source.cs @@ -35,7 +35,7 @@ namespace Avalonia.Markup.Xaml.UnitTests.Data get { return _foo; } set { - _foo = Foo; + _foo = value; RaisePropertyChanged(); } } From 8c9988d1faa922877ea8149e764de0e76ec50db7 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Sat, 5 Aug 2017 20:02:47 -0700 Subject: [PATCH 7/9] Remove RxUI submodule info from .gitmodules --- .gitmodules | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index 6e9b10efa4..98b6d076c1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "src/Avalonia.ReactiveUI/src"] - path = src/Avalonia.ReactiveUI/src - url = https://github.com/reactiveui/ReactiveUI.git [submodule "src/Avalonia.HtmlRenderer/external"] path = src/Avalonia.HtmlRenderer/external url = https://github.com/AvaloniaUI/HTML-Renderer.git From cbfe93beb9ad9326171d4f18e25f52221c27ea07 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Sat, 5 Aug 2017 20:11:01 -0700 Subject: [PATCH 8/9] Create Avalonia.ReactiveUI package. --- packages.cake | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/packages.cake b/packages.cake index 0824dc6098..4f8cadb4cd 100644 --- a/packages.cake +++ b/packages.cake @@ -111,6 +111,7 @@ public class Packages var SplatVersion = packageVersions["Splat"].FirstOrDefault().Item1; var SpracheVersion = packageVersions["Sprache"].FirstOrDefault().Item1; var SystemReactiveVersion = packageVersions["System.Reactive"].FirstOrDefault().Item1; + var ReactiveUIVersion = packageVersions["reactiveui"].FirstOrDefault().Item1; var SystemValueTupleVersion = packageVersions["System.ValueTuple"].FirstOrDefault().Item1; SkiaSharpVersion = packageVersions["SkiaSharp"].FirstOrDefault().Item1; SkiaSharpLinuxVersion = packageVersions["Avalonia.Skia.Linux.Natives"].FirstOrDefault().Item1; @@ -124,6 +125,7 @@ public class Packages context.Information("Package: Splat, version: {0}", SplatVersion); context.Information("Package: Sprache, version: {0}", SpracheVersion); context.Information("Package: System.Reactive, version: {0}", SystemReactiveVersion); + context.Information("Package: reactiveui, version: {0}", ReactiveUIVersion); context.Information("Package: System.ValueTuple, version: {0}", SystemValueTupleVersion); context.Information("Package: SkiaSharp, version: {0}", SkiaSharpVersion); context.Information("Package: Avalonia.Skia.Linux.Natives, version: {0}", SkiaSharpLinuxVersion); @@ -176,7 +178,6 @@ public class Packages new [] { "./src/", "Avalonia.Visuals", ".xml" }, new [] { "./src/", "Avalonia.Styling", ".dll" }, new [] { "./src/", "Avalonia.Styling", ".xml" }, - new [] { "./src/", "Avalonia.ReactiveUI", ".dll" }, new [] { "./src/", "Avalonia.Themes.Default", ".dll" }, new [] { "./src/", "Avalonia.Themes.Default", ".xml" }, new [] { "./src/Markup/", "Avalonia.Markup", ".dll" }, @@ -273,7 +274,25 @@ public class Packages }, BasePath = context.Directory("./src/Avalonia.HtmlRenderer/bin/" + parameters.DirSuffix + "/netstandard1.3"), OutputDirectory = parameters.NugetRoot - } + }, + /////////////////////////////////////////////////////////////////////////////// + // Avalonia.ReactiveUI + /////////////////////////////////////////////////////////////////////////////// + new NuGetPackSettings() + { + Id = "Avalonia.ReactiveUI", + Dependencies = new [] + { + new NuSpecDependency() { Id = "Avalonia", Version = parameters.Version }, + new NuSpecDependency() { Id = "reactiveui", Version = ReactiveUIVersion } + }, + Files = new [] + { + new NuSpecContent { Source = "Avalonia.ReactiveUI.dll", Target = "lib/netstandard1.3" } + }, + BasePath = context.Directory("./src/Avalonia.ReactiveUI/bin/" + parameters.DirSuffix + "/netstandard1.3"), + OutputDirectory = parameters.NugetRoot + }, }; var nuspecNuGetSettingsMobile = new [] From bb75421b3e09197c50a35884e4a6affcdfc80fc8 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Sun, 6 Aug 2017 13:32:19 -0700 Subject: [PATCH 9/9] PR feedback --- build/Rx.props | 3 +-- packages.cake | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/build/Rx.props b/build/Rx.props index e63055da3e..e88ab1ec37 100644 --- a/build/Rx.props +++ b/build/Rx.props @@ -5,7 +5,6 @@ - - + diff --git a/packages.cake b/packages.cake index 4f8cadb4cd..78052e8a5e 100644 --- a/packages.cake +++ b/packages.cake @@ -281,11 +281,10 @@ public class Packages new NuGetPackSettings() { Id = "Avalonia.ReactiveUI", - Dependencies = new [] + Dependencies = new DependencyBuilder(this) { new NuSpecDependency() { Id = "Avalonia", Version = parameters.Version }, - new NuSpecDependency() { Id = "reactiveui", Version = ReactiveUIVersion } - }, + }.Deps(new string[] {null}, "reactiveui"), Files = new [] { new NuSpecContent { Source = "Avalonia.ReactiveUI.dll", Target = "lib/netstandard1.3" }