Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrated to Uno 5.1 and .NET 8 #9

Draft
wants to merge 40 commits into
base: uno
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
f14b7b2
Implemented basic navigation
Jan 30, 2021
c2a3c92
Implemented passing initial parameter
xperiandri Feb 21, 2021
f747831
Implemented validation errors as observable collections of objects
xperiandri May 16, 2021
067a8a9
Implemented updateObservableCollection instead of elmStyleMerge
xperiandri May 16, 2021
00eb540
Renamed Samples.sln
Apr 27, 2021
c276086
Added a workflow that builds a NuGet package and pushes it into MyGet
Apr 15, 2021
453f2f6
Added template implementation for visual studio
May 17, 2021
38dcf25
Fixed ICustomProperty implementation in DynamicCustomProperty
xperiandri Jun 29, 2021
2a49978
Fixed ICustomProperty bindings initialization
xperiandri Jul 8, 2021
222a7fc
Updated SolutionTemplate and workflows
xperiandri Jul 9, 2021
a616a3b
Enabled parallel build
xperiandri Aug 24, 2021
b71db34
Fixed deadlock on WASM
xperiandri Aug 14, 2021
419975d
Migrated core and samples projects to Solution.Build.props and aligne…
xperiandri Aug 21, 2021
e09ae2f
Added trys with Debugger.Break() if exception for PropertyChanged and…
xperiandri Aug 21, 2021
db6a613
Fixed SubModelSeq sample containing TreeView by using WinUI version
xperiandri Aug 21, 2021
e379c5a
Added slnf for VSMav and Blend and fixed build on MacOS
xperiandri Sep 24, 2021
574588f
Fixed publishing .editorconfig to template
xperiandri Sep 24, 2021
7fbdc36
Updated to Uno 3.10.*
xperiandri Sep 24, 2021
01421e6
Made all variable GUIDs replaceable on template creation
xperiandri Sep 24, 2021
eef243c
Ordered projects in sln files
xperiandri Oct 16, 2021
e222b47
Updated FSharp.Core to 6.0.* and Microsoft.UI.Xaml to 2.7.*
xperiandri Oct 16, 2021
f5951d5
Improved samples UI with iOS visible bound for each page and title ba…
xperiandri Oct 23, 2021
51820d2
Added Fantomas configuration to .editorconfig
xperiandri Oct 23, 2021
eeb10bd
Set C# and F# language versions and FSharp.Core version via variables
xperiandri Apr 7, 2022
38c5d8b
Migrated to Uno.UI 4.1.*, .NET 6 but not MAUI and NuGet 6
xperiandri Jan 17, 2022
4493f7d
Added missing XML comments file for UWP into NuSpec, updated UWP targ…
xperiandri Jan 17, 2022
98003b8
Added missing XML documentation file generation to UWP
xperiandri Feb 20, 2022
89e9771
Updated to .NET 6.0.200 runtime
xperiandri Feb 21, 2022
6f29ea6
Fixed all the warnings and added all the missing XML docs
xperiandri Feb 21, 2022
c61c2f5
Migrated to .NET 6 MAUI
Feb 20, 2022
aeb3623
Set up central version management of Nuget packages, fixed the "Autho…
Apr 11, 2022
60030d5
Set up central version management of Nuget packages, changed SDK vers…
Apr 18, 2022
523e9aa
fixup! Set up central version management of Nuget packages, fixed the…
xperiandri May 15, 2022
5a1b480
Fixed counter minus symbol
xperiandri Oct 26, 2023
b695d8b
Updated to .NET 6 (draft)
Oct 18, 2022
4c7fcf7
Migrated to Uno WinUI
xperiandri Oct 26, 2023
8785d7c
Migrated the library to Uno 5.1 and .NET 8
xperiandri Mar 28, 2024
ef8464f
fixup! Migrated the library to Uno 5.1 and .NET 8
xperiandri Apr 1, 2024
35993e7
fixup! Migrated the library to Uno 5.1 and .NET 8
xperiandri Apr 1, 2024
eaf0ae9
fixup! Migrated the library to Uno 5.1 and .NET 8
Apr 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
69 changes: 63 additions & 6 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# To learn more about .editorconfig see https://aka.ms/editorconfigdocs
root = true
###############################
# Core EditorConfig Options #
###############################
root = true
# All files
[*]
end_of_line = crlf
Expand All @@ -13,10 +13,14 @@ trim_trailing_whitespace = true
[*.{cs,csx,vb,vbx}]
indent_size = 4
charset = utf-8-bom
[*.{fs,fsx}]
indent_size = 2
charset = utf-8-bom
# Project files
[*.{csproj,fsproj,vbproj,shproj,projitems,plist,nuspec}]
[*.{csproj,fsproj,vbproj,shproj,projitems,props,nuspec,config,xaml,xml,plist}]
indent_size = 2
charset = utf-8-bom

###############################
# .NET Coding Conventions #
###############################
Expand All @@ -37,8 +41,11 @@ dotnet_style_parentheses_in_relational_binary_operators = always_for_cl
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity : suggestion
dotnet_style_parentheses_in_other_operators = never_if_unnecessary : suggestion
# Modifier preferences
dotnet_style_require_accessibility_modifiers = always : warning
dotnet_style_readonly_field = true : warning
dotnet_style_require_accessibility_modifiers = always : warning
roslynator_accessibility_modifiers = explicit
roslynator_enum_has_flag_style = method
roslynator_object_creation_type_style = implicit
# Expression-level preferences
dotnet_style_object_initializer = true : warning
dotnet_style_collection_initializer = true : warning
Expand All @@ -51,6 +58,7 @@ dotnet_prefer_inferred_anonymous_type_member_names = true : sugges
dotnet_style_prefer_auto_properties = true : silent
dotnet_style_prefer_conditional_expression_over_assignment = true : silent
dotnet_style_prefer_conditional_expression_over_return = true : silent

###############################
# Naming Conventions #
###############################
Expand Down Expand Up @@ -138,6 +146,7 @@ dotnet_naming_rule.non_interface_types_must_be_pascal_case.style = p
dotnet_naming_rule.interface_types_must_be_prefixed_with_i.severity = warning
dotnet_naming_rule.interface_types_must_be_prefixed_with_i.symbols = interface_types
dotnet_naming_rule.interface_types_must_be_prefixed_with_i.style = prefix_interface_interface_with_i

###############################
# C# Coding Conventions #
###############################
Expand Down Expand Up @@ -167,6 +176,7 @@ csharp_style_deconstructed_variable_declaration = true
csharp_prefer_simple_default_expression = true : suggestion
csharp_style_pattern_local_over_anonymous_function = true : suggestion
csharp_style_inlined_variable_declaration = true : warning

###############################
# C# Formatting Rules #
###############################
Expand Down Expand Up @@ -197,12 +207,11 @@ csharp_space_between_method_call_empty_parameter_list_parentheses = false
# Wrapping preferences
csharp_preserve_single_line_statements = true
csharp_preserve_single_line_blocks = true

###############################
# F# Coding Conventions #
###############################
[*.{fs,fsx}]
indent_size = 2
charset = utf-8-bom
max_line_length=120
fsharp_semicolon_at_end_of_line=false
fsharp_space_before_parameter=true
Expand Down Expand Up @@ -239,12 +248,15 @@ fsharp_alternative_long_member_definitions=false
fsharp_disable_elmish_syntax=false
fsharp_multi_line_lambda_closing_newline=false
fsharp_strict_mode=false

###############################
# VB Coding Conventions #
###############################

[*.vb]
# Modifier preferences
visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async : suggestion

###############################
# Code Analysis #
###############################
Expand Down Expand Up @@ -815,7 +827,7 @@ dotnet_diagnostic.CA5383.severity = warning
# CA5384: Do Not Use Digital Signature Algorithm (DSA)
dotnet_diagnostic.CA5384.severity = warning

# CA5385: Use RivestShamirAdleman (RSA) Algorithm With Sufficient Key Size
# CA5385: Use Rivest Shamir Adleman (RSA) Algorithm With Sufficient Key Size
dotnet_diagnostic.CA5385.severity = warning

# CA5386: Avoid hardcoding SecurityProtocolType value
Expand Down Expand Up @@ -874,3 +886,48 @@ dotnet_diagnostic.CA5403.severity = warning

# CA9999: Analyzer version mismatch
dotnet_diagnostic.CA9999.severity = warning

# RCS1163: Unused parameter
dotnet_diagnostic.RCS1163.severity = none

###############################
# Code Analysis Exceptions #
###############################
[**/{Main.*.cs,Program.cs,*Activity.*.cs,Shell.xaml.cs,*Page.cs,Samples/**.xaml.cs,*Behavior.cs,Controls/**.cs,Components/**.cs}]
# CA1001: Type owns disposable field(s) but is not disposable
dotnet_diagnostic.CA1001.severity = none
# CA1010: Collections should implement generic interface
dotnet_diagnostic.CA1010.severity = none
# CA1012: Abstract type 'ShellBase' should not have public constructors
dotnet_diagnostic.CA1012.severity = none
# CA1010: Collections should implement generic interface
dotnet_diagnostic.CA1010.severity = none
# CA1010: Collections should implement generic interface
dotnet_diagnostic.CA1010.severity = none
# CA1501: Avoid excessive inheritance
dotnet_diagnostic.CA1501.severity = none
# IDE0001: Simplify Names
dotnet_diagnostic.IDE0001.severity = suggestion
# IDE0021: Use expression body for constructors
dotnet_diagnostic.IDE0021.severity = suggestion

[{Shell.xaml.cs,**Page.cs,**Page.xaml.cs,**/Controls/**.cs}]
csharp_style_expression_bodied_constructors = false
# RCS1043: Remove 'partial' modifier from type with a single part.
dotnet_diagnostic.RCS1043.severity = none

[{App.xaml.cs,Main.*.cs,Shell.xaml.cs}]
# CA1724: Type names should not match namespaces
dotnet_diagnostic.CA1724.severity = none
# DF0000: Marks indisposed anonymous objects from object creations.
dotnet_diagnostic.DF0000.severity = silent
# DF0010: Marks indisposed local variables.
dotnet_diagnostic.DF0010.severity = silent
# DF0021: Field is not disposed.
dotnet_diagnostic.DF0021.severity = silent

[{App.xaml.cs,Program.cs}]
# CA1724: The type name App conflicts in whole or in part with the namespace name. Change either name to eliminate the conflict.
dotnet_diagnostic.CA1724.severity = none
# CA1801: Parameter args of method Main is never used. Remove the parameter or use it in the method body.
dotnet_diagnostic.CA1801.severity = none
40 changes: 0 additions & 40 deletions .github/workflows/continuous_integration.yml

This file was deleted.

65 changes: 65 additions & 0 deletions .github/workflows/publish_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Publish to MyGet

on:
push:
branches:
- uno

env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: true

jobs:
build:

runs-on: windows-2022

steps:

- name: Check-out
uses: actions/checkout@v4

- name: Set Build Version
run: |
cd src/Elmish.Uno
$version = "$env:GITHUB_REF_NAME".Substring("releases/".Length)
$File = (
Select-Xml -XPath "/Project/PropertyGroup[@Label='NuGet']/Version" -Path Elmish.Uno.fsproj
)[0].Node
$File.InnerText = $version
$File.OwnerDocument.Save((Join-Path $PWD.ProviderPath Elmish.Uno.fsproj))
echo "VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
shell: pwsh

- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Add the GitHub and MyGet sources
run: |
dotnet nuget add source --username USERNAME --password ${{secrets.GITHUB_TOKEN}} --store-password-in-clear-text --name "github.com" "https://nuget.pkg.github.com/fsprojects/index.json"
dotnet nuget add source --username USERNAME --password ${{secrets.MYGET_TOKEN}} --store-password-in-clear-text --name "myget.org" "https://www.myget.org/F/elmish_uno/api/v3/index.json"

- name: Install local tools
run: dotnet tool restore

- name: Restore NuGet packages
run: dotnet restore Elmish.Uno.sln

- name: Build
run: dotnet build --no-restore Elmish.Uno.sln --configuration Release -maxcpucount

- name: Test
run: dotnet test --no-build --configuration Release src/Elmish.Uno.Tests/Elmish.Uno.Tests.fsproj

- name: Pack
run: |
cd src/Elmish.Uno
dotnet pack --no-build --configuration Release /p:ContinuousIntegrationBuild=true -o ../../nuget

- name: Publish to MyGet
run: |
dotnet nuget push nuget/Elmish.Uno.${{env.VERSION}}.{nupkg,snupkg} -s "github.com" -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate
dotnet nuget push nuget/Elmish.Uno.${{env.VERSION}}.{nupkg,snupkg} -s "myget.org" -k ${{secrets.MYGET_SECRET}} --skip-duplicate

60 changes: 60 additions & 0 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Publish to NuGet

on:
push:
tags:
- 'releases/*'

env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: true

jobs:
build:

runs-on: windows-2022

steps:

- name: Check-out
uses: actions/checkout@v4
with:
# This is necessary so that we have the tags.
fetch-depth: 0

- name: Set Build Version
run: |
$version = "$env:GITHUB_REF_NAME".Substring("releases/".Length)
$File = (
Select-Xml -XPath "/Project/PropertyGroup[@Label='NuGet']/Version" -Path "src\Elmish.Uno\Elmish.Uno.fsproj"
)[0].Node
$File.InnerText = $version
$File.OwnerDocument.Save((Join-Path $PWD.ProviderPath "src\Elmish.Uno\Elmish.Uno.fsproj"))
echo "VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
shell: pwsh

- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Install local tools
run: dotnet tool restore

- name: Restore NuGet packages
run: dotnet restore Elmish.Uno.sln

- name: Build
run: dotnet build --no-restore Elmish.Uno.sln --configuration Release -maxcpucount

- name: Test
run: dotnet test --no-build --configuration Release src/Elmish.Uno.Tests/Elmish.Uno.Tests.fsproj

- name: Pack
run: |
cd src/Elmish.Uno
dotnet pack --no-build --configuration Release /p:ContinuousIntegrationBuild=true -o ../../nuget

- name: Publish to NuGet
run: |
dotnet nuget push nuget/Elmish.Uno.${{env.VERSION}}.{nupkg,snupkg} -s "nuget.org" -k ${{secrets.NUGET_SECRET}} --skip-duplicate
33 changes: 20 additions & 13 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,37 @@ on:
- opened
- synchronize

env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: true

jobs:
build:

runs-on: windows-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
dotnet: [8.0.202]
runs-on: ${{ matrix.os }}

steps:

- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install .NET SDK 3.0.x
uses: actions/setup-dotnet@v1
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 3.0.x
dotnet-version: ${{ matrix.dotnet }}

- name: Install .NET SDK 5.0.103
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.103
- name: Install local tools
run: dotnet tool restore

- name: Restore
run: dotnet restore src/Elmish.WPF.sln
- name: Restore NuGet packages
run: dotnet restore Elmish.Uno.sln

- name: Build
run: dotnet build --no-restore --configuration Release src/Elmish.WPF.sln
run: dotnet build --no-restore Elmish.Uno.sln --configuration Release -maxcpucount

- name: Test
run: dotnet test --no-build --configuration Release src/Elmish.WPF.Tests/Elmish.WPF.Tests.fsproj
run: dotnet test --no-build --configuration Release src/Elmish.Uno.Tests/Elmish.Uno.Tests.fsproj
Loading
Loading