Skip to content

Commit

Permalink
fixes to build
Browse files Browse the repository at this point in the history
  • Loading branch information
Epictek committed Sep 23, 2024
1 parent 4a3cef6 commit 4559b18
Show file tree
Hide file tree
Showing 41 changed files with 87 additions and 150 deletions.
36 changes: 17 additions & 19 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
build:

runs-on: windows-2022
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
Expand All @@ -19,29 +19,27 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Install MAUI
run: dotnet workload install maui
- name: Restore dependencies
run: dotnet restore BlazorBindings.Maui.sln
- name: Run tests
run: dotnet test src/BlazorBindings.UnitTests --no-restore --verbosity normal --collect:"XPlat Code Coverage"
- name: Build templates
run: |
cd templates
dotnet build -c Release --no-restore
cd ..
run: dotnet restore BlazorBindings.Avalonia.sln
# - name: Run tests
# run: dotnet test src/BlazorBindings.UnitTests --no-restore --verbosity normal --collect:"XPlat Code Coverage"
# - name: Build templates
# run: |
# cd templates
# dotnet build -c Release --no-restore
# cd ..
- name: Pack nugets
run: dotnet pack -o ./packages -c Release --no-restore
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3
with:
path: packages

publish-to-myget:
runs-on: windows-2022
needs: [build]
steps:
- uses: actions/download-artifact@v3

- name: Publish to Myget
run: dotnet nuget push */*.nupkg -k ${{ secrets.MYGET_TOKEN }} -s https://www.myget.org/F/blazorbindings/api/v2/package
# publish-to-myget:
# runs-on: windows-2022
# needs: [build]
# steps:
# - uses: actions/download-artifact@v3
#
# - name: Publish to Myget
# run: dotnet nuget push */*.nupkg -k ${{ secrets.MYGET_TOKEN }} -s https://www.myget.org/F/blazorbindings/api/v2/package
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.editorconfig = .editorconfig
src\Directory.Build.props = src\Directory.Build.props
src\Directory.Build.targets = src\Directory.Build.targets
Directory.Packages.props = Directory.Packages.props
global.json = global.json
Readme.md = Readme.md
THIRD-PARTY-NOTICES.txt = THIRD-PARTY-NOTICES.txt
version.json = version.json
Expand All @@ -21,13 +19,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Avalonia", "Avalonia", "{9F
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorBindings.Avalonia", "src\BlazorBindings.Avalonia\BlazorBindings.Avalonia.csproj", "{CC3F59CD-EFD5-4926-B042-7EB098EC90C1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorBindings.AvaloniaBindings.ComponentGenerator", "src\BlazorBindings.AvaloniaBindings.ComponentGenerator\BlazorBindings.AvaloniaBindings.ComponentGenerator.csproj", "{7E1C80F8-8F74-41F5-9D20-D8510821C1B2}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorBindings.Avalonia.ComponentGenerator", "src\BlazorBindings.Avalonia.ComponentGenerator\BlazorBindings.Avalonia.ComponentGenerator.csproj", "{7E1C80F8-8F74-41F5-9D20-D8510821C1B2}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{9A81174C-6F1B-4BCC-85C6-1A780622EEAA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorBindings.AvaloniaBindings.HelloWorld", "src\BlazorBindings.AvaloniaBindings.HelloWorld\BlazorBindings.AvaloniaBindings.HelloWorld.csproj", "{F2E6A53B-6FAC-41B6-9B49-29388D0BFD05}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorBindings.Avalonia.HelloWorld", "src\BlazorBindings.Avalonia.HelloWorld\BlazorBindings.Avalonia.HelloWorld.csproj", "{F2E6A53B-6FAC-41B6-9B49-29388D0BFD05}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorBindings.AvaloniaBindings.Core", "src\BlazorBindings.AvaloniaBindings.Core\BlazorBindings.AvaloniaBindings.Core.csproj", "{E1B6387B-11C3-413F-9D75-24F4A169D3B2}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorBindings.Avalonia.Core", "src\BlazorBindings.Avalonia.Core\BlazorBindings.Avalonia.Core.csproj", "{E1B6387B-11C3-413F-9D75-24F4A169D3B2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Authors>Microsoft, Dreamescaper, Warapppa</Authors>
<Authors>Microsoft, Dreamescaper, Warapppa, Epictek</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
Expand Down
43 changes: 0 additions & 43 deletions Directory.Packages.props

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace BlazorBindings.AvaloniaBindings.ComponentGenerator;
namespace BlazorBindings.Avalonia.ComponentGenerator;

[Flags]
public enum AttachedPropertyGeneration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

using BlazorBindings.AvaloniaBindings.ComponentGenerator.Extensions;
using BlazorBindings.Avalonia.ComponentGenerator.Extensions;
using Microsoft.CodeAnalysis;
using System;
using System.Collections.Generic;
Expand All @@ -11,7 +11,7 @@
using System.Text.RegularExpressions;
using System.Xml;

namespace BlazorBindings.AvaloniaBindings.ComponentGenerator;
namespace BlazorBindings.Avalonia.ComponentGenerator;

public partial class ComponentWrapperGenerator
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;

namespace BlazorBindings.AvaloniaBindings.ComponentGenerator.Extensions;
namespace BlazorBindings.Avalonia.ComponentGenerator.Extensions;

internal static class SymbolExtensions
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Collections.Generic;
using System.Linq;

namespace BlazorBindings.AvaloniaBindings.ComponentGenerator;
namespace BlazorBindings.Avalonia.ComponentGenerator;

public class GenerateComponentSettings
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BlazorBindings.AvaloniaBindings.ComponentGenerator.Extensions;
using BlazorBindings.Avalonia.ComponentGenerator.Extensions;
using CommandLine;
using Microsoft.CodeAnalysis;
using System;
Expand All @@ -7,7 +7,7 @@
using System.Linq;
using System.Reflection;

namespace BlazorBindings.AvaloniaBindings.ComponentGenerator;
namespace BlazorBindings.Avalonia.ComponentGenerator;

public enum GeneratedFieldKind
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using BlazorBindings.AvaloniaBindings.ComponentGenerator.Extensions;
using BlazorBindings.Avalonia.ComponentGenerator.Extensions;
using Microsoft.CodeAnalysis;
using System;
using System.Linq;
using System.Reflection;

namespace BlazorBindings.AvaloniaBindings.ComponentGenerator;
namespace BlazorBindings.Avalonia.ComponentGenerator;

public partial class GeneratedPropertyInfo
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using BlazorBindings.AvaloniaBindings.ComponentGenerator.Extensions;
using BlazorBindings.Avalonia.ComponentGenerator.Extensions;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using System;
using System.Linq;

namespace BlazorBindings.AvaloniaBindings.ComponentGenerator;
namespace BlazorBindings.Avalonia.ComponentGenerator;

public partial class GeneratedPropertyInfo
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using BlazorBindings.AvaloniaBindings.ComponentGenerator.Extensions;
using BlazorBindings.Avalonia.ComponentGenerator.Extensions;
using Microsoft.CodeAnalysis;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;

namespace BlazorBindings.AvaloniaBindings.ComponentGenerator;
namespace BlazorBindings.Avalonia.ComponentGenerator;

public partial class GeneratedPropertyInfo
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace BlazorBindings.AvaloniaBindings.ComponentGenerator;
namespace BlazorBindings.Avalonia.ComponentGenerator;

public enum GeneratedPropertyKind
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using BlazorBindings.AvaloniaBindings.ComponentGenerator.Extensions;
using BlazorBindings.Avalonia.ComponentGenerator.Extensions;
using Microsoft.CodeAnalysis;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BlazorBindings.AvaloniaBindings.ComponentGenerator;
namespace BlazorBindings.Avalonia.ComponentGenerator;

public class GeneratedTypeInfo
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

using BlazorBindings.AvaloniaBindings.ComponentGenerator.Extensions;
using BlazorBindings.Avalonia.ComponentGenerator.Extensions;
using CommandLine;
using Microsoft.Build.Locator;
using Microsoft.CodeAnalysis;
Expand All @@ -11,7 +11,7 @@
using System.Linq;
using System.Threading.Tasks;

namespace BlazorBindings.AvaloniaBindings.ComponentGenerator;
namespace BlazorBindings.Avalonia.ComponentGenerator;

public class Program
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"profiles": {
"GenerateBlazorBindings.Avalonia": {
"commandName": "Project",
"commandLineArgs": "..\\..\\..\\..\\BlazorBindings.AvaloniaBindings\\BlazorBindings.AvaloniaBindings.csproj"
"commandLineArgs": "..\\..\\..\\..\\BlazorBindings.Avalonia\\BlazorBindings.Avalonia.csproj"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

namespace BlazorBindings.AvaloniaBindings.ComponentGenerator;
namespace BlazorBindings.Avalonia.ComponentGenerator;

public sealed class UsingStatement
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Title>Avalonia Blazor Bindings Core Runtime</Title>
<Description>Common logic for using Blazor to target native renderers. For Avalonia app projects use the BlazorBindings.AvaloniaBindings package.</Description>
<Description>Common logic for using Blazor to target native renderers. For Avalonia app projects use the BlazorBindings.Avalonia package.</Description>
<PackageTags>blazor;blazorbindings</PackageTags>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<helloWorld:BlazorBindingsApplicationMainPage
<local:BlazorBindingsApplicationMainPage
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="BlazorBindings.Avalonia.HelloWorld.App"
xmlns:local="using:BlazorBindings.Avalonia.HelloWorld"
xmlns:nav="using:BlazorBindings.Avalonia.Navigation"
xmlns:helloWorld="clr-namespace:BlazorBindings.AvaloniaBindings.HelloWorld"
xmlns:helloWorld="clr-namespace:BlazorBindings.Avalonia.HelloWorld"
RequestedThemeVariant="Default">
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->

<helloWorld:BlazorBindingsApplicationMainPage.DataTemplates>

</helloWorld:BlazorBindingsApplicationMainPage.DataTemplates>

<helloWorld:BlazorBindingsApplicationMainPage.Styles>
<local:BlazorBindingsApplicationMainPage.Styles>
<FluentTheme />
<StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Fluent.xaml"/>

Expand All @@ -29,5 +29,5 @@
</ControlTheme>
</Setter>
</Style>
</helloWorld:BlazorBindingsApplicationMainPage.Styles>
</helloWorld:BlazorBindingsApplicationMainPage>
</local:BlazorBindingsApplicationMainPage.Styles>
</local:BlazorBindingsApplicationMainPage>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using BlazorBindings.Avalonia;
using System;

namespace BlazorBindings.AvaloniaBindings.HelloWorld;
namespace BlazorBindings.Avalonia.HelloWorld;

public class App : BlazorBindingsApplicationMainPage
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@* @inherits NativeControlComponentBase *@
@inject INavigation navigation

@namespace BlazorBindings.AvaloniaBindings.HelloWorld
@namespace BlazorBindings.Avalonia.HelloWorld

@using BlazorBindings.Avalonia.Elements
@using System.Collections.ObjectModel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System;
using BlazorBindings.Avalonia;

namespace BlazorBindings.AvaloniaBindings.HelloWorld;
namespace BlazorBindings.Avalonia.HelloWorld;

internal class Program
{
Expand Down
25 changes: 25 additions & 0 deletions src/BlazorBindings.Avalonia.HelloWorld/SubPage.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@page "/sub"
@* @inherits NativeControlComponentBase *@

@namespace BlazorBindings.Avalonia.HelloWorld

@using BlazorBindings.Avalonia.Elements
@using BlazorBindings.Avalonia
@using global::Avalonia.Layout
@using global::Avalonia.Media
@inject INavigation navigation

<ScrollViewer>
<StackPanel HorizontalAlignment="HorizontalAlignment.Center"
VerticalAlignment="VerticalAlignment.Top">
<TextBlock Text="Sub" Foreground="Brushes.White"></TextBlock>
<Button OnClick="Back">Back</Button>
</StackPanel>
</ScrollViewer>

@code {
public async Task Back()
{
await navigation.PopAsync();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- This manifest is used on Windows only.
Don't remove it as it might cause problems with window transparency and embeded controls.
For more details visit https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests -->
<assemblyIdentity version="1.0.0.0" name="BlazorBindings.AvaloniaBindings.HelloWorld.Desktop"/>
<assemblyIdentity version="1.0.0.0" name="BlazorBindings.Avalonia.HelloWorld.Desktop"/>

<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
Expand Down
Loading

0 comments on commit 4559b18

Please sign in to comment.