chore: Bump to Uno.SourceGeneration 4.0
+semver: major
This commit is contained in:
Родитель
81f6ca7367
Коммит
cdb887ae20
59
.vsts-ci.yml
59
.vsts-ci.yml
|
@ -1,19 +1,58 @@
|
|||
phases:
|
||||
- phase: VS_Latest
|
||||
pool:
|
||||
vmImage: 'windows-2022'
|
||||
|
||||
steps:
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
- beta
|
||||
- release/beta/*
|
||||
- stable
|
||||
- release/stable/*
|
||||
|
||||
pr:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
- beta
|
||||
- release/beta/*
|
||||
- stable
|
||||
- release/stable/*
|
||||
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
clean: 'true'
|
||||
|
||||
- powershell: './build/build.ps1 -script build/build.cake'
|
||||
- task: gitversion/setup@0
|
||||
inputs:
|
||||
versionSpec: '5.6.8'
|
||||
|
||||
- task: gitversion/execute@0
|
||||
inputs:
|
||||
useConfigFile: true
|
||||
configFilePath: gitversion.yml
|
||||
displayName: Use GitVersion
|
||||
|
||||
- task: MSBuild@1
|
||||
inputs:
|
||||
solution: src/Uno.CodeGen.sln
|
||||
msbuildArchitecture: x86
|
||||
msbuildArguments: /r /p:Configuration=Release "/p:PackageOutputPath=$(build.artifactstagingdirectory)\vslatest" "/p:PackageVersion=%GITVERSION_FullSemVer%" "/p:InformationalVersion=%GITVERSION_InformationalVersion%" /detailedsummary
|
||||
clean: false
|
||||
maximumCpuCount: true
|
||||
restoreNugetPackages: false
|
||||
logProjectEvents: false
|
||||
createLogFile: false
|
||||
|
||||
- task: VisualStudioTestPlatformInstaller@1
|
||||
|
||||
- task: VSTest@2
|
||||
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
SourceFolder: $(Build.SourcesDirectory)/build
|
||||
Contents: '*.nupkg'
|
||||
TargetFolder: $(Build.ArtifactStagingDirectory)/vslatest
|
||||
testAssemblyVer2: |
|
||||
**\*test*.dll
|
||||
!**\obj\**
|
||||
vsTestVersion: toolsInstaller
|
||||
testSelector: testAssemblies
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
@ECHO OFF
|
||||
PowerShell.exe -file build.ps1 -target=UpdateHeaders -Verbosity Verbose
|
||||
PAUSE
|
145
build/build.cake
145
build/build.cake
|
@ -1,145 +0,0 @@
|
|||
#addin "Cake.FileHelpers"
|
||||
#addin "Cake.Powershell"
|
||||
#tool "nuget:?package=GitVersion.CommandLine&version=4.0.0"
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// ARGUMENTS
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
var target = Argument("target", "Default");
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// VERSIONS
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
var gitVersioningVersion = "2.0.41";
|
||||
var signClientVersion = "0.9.0";
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// VARIABLES
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
var baseDir = MakeAbsolute(Directory("../")).ToString();
|
||||
var buildDir = baseDir + "/build";
|
||||
var Solution = baseDir + "/src/Uno.CodeGen.sln";
|
||||
GitVersion versionInfo = null;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// METHODS
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void VerifyHeaders(bool Replace)
|
||||
{
|
||||
var header = FileReadText("header.txt") + "\r\n";
|
||||
bool hasMissing = false;
|
||||
|
||||
Func<IFileSystemInfo, bool> exclude_objDir =
|
||||
fileSystemInfo => !fileSystemInfo.Path.Segments.Contains("obj");
|
||||
|
||||
var files = GetFiles(baseDir + "/**/*.cs", exclude_objDir).Where(file =>
|
||||
{
|
||||
var path = file.ToString();
|
||||
return !(path.EndsWith(".g.cs") || path.EndsWith(".i.cs") || System.IO.Path.GetFileName(path).Contains("TemporaryGeneratedFile"));
|
||||
});
|
||||
|
||||
Information("\nChecking " + files.Count() + " file header(s)");
|
||||
foreach(var file in files)
|
||||
{
|
||||
var oldContent = FileReadText(file);
|
||||
if(oldContent.Contains("// <auto-generated>"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
var rgx = new Regex("^(//.*\r?\n|\r?\n)*");
|
||||
var newContent = header + rgx.Replace(oldContent, "");
|
||||
|
||||
if(!newContent.Equals(oldContent, StringComparison.Ordinal))
|
||||
{
|
||||
if(Replace)
|
||||
{
|
||||
Information("\nUpdating " + file + " header...");
|
||||
FileWriteText(file, newContent);
|
||||
}
|
||||
else
|
||||
{
|
||||
Error("\nWrong/missing header on " + file);
|
||||
hasMissing = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!Replace && hasMissing)
|
||||
{
|
||||
throw new Exception("Please run UpdateHeaders.bat or '.\\build.ps1 -target=UpdateHeaders' and commit the changes.");
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// DEFAULT TASK
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
Task("Build")
|
||||
.IsDependentOn("Version")
|
||||
.IsDependentOn("ValidateHeaders")
|
||||
.Description("Build all projects and get the assemblies")
|
||||
.Does(() =>
|
||||
{
|
||||
Information("\nBuilding Solution");
|
||||
|
||||
var buildSettings = new MSBuildSettings
|
||||
{
|
||||
}
|
||||
.SetConfiguration("Release")
|
||||
.WithProperty("PackageVersion", versionInfo.FullSemVer)
|
||||
.WithProperty("InformationalVersion", versionInfo.InformationalVersion)
|
||||
.WithProperty("PackageOutputPath", buildDir)
|
||||
.WithTarget("Restore")
|
||||
.WithTarget("Build")
|
||||
.WithTarget("Pack");
|
||||
|
||||
MSBuild(Solution, buildSettings);
|
||||
});
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// TASK TARGETS
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
Task("Default")
|
||||
.IsDependentOn("Build");
|
||||
|
||||
Task("UpdateHeaders")
|
||||
.Description("Updates the headers in *.cs files")
|
||||
.Does(() =>
|
||||
{
|
||||
VerifyHeaders(true);
|
||||
});
|
||||
|
||||
Task("ValidateHeaders")
|
||||
.Description("Validates the headers in *.cs files")
|
||||
.Does(() =>
|
||||
{
|
||||
VerifyHeaders(false);
|
||||
});
|
||||
|
||||
Task("Version")
|
||||
.Description("Updates target versions")
|
||||
.Does(() =>
|
||||
{
|
||||
versionInfo = GitVersion(new GitVersionSettings {
|
||||
UpdateAssemblyInfo = true,
|
||||
UpdateAssemblyInfoFilePath = baseDir + "/build/AssemblyVersion.cs"
|
||||
});
|
||||
|
||||
Information($"FullSemVer: {versionInfo.FullSemVer} Sha: {versionInfo.Sha}");
|
||||
});
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// EXECUTION
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
RunTarget(target);
|
235
build/build.ps1
235
build/build.ps1
|
@ -1,235 +0,0 @@
|
|||
##########################################################################
|
||||
# This is the Cake bootstrapper script for PowerShell.
|
||||
# This file was downloaded from https://github.com/cake-build/resources
|
||||
# Feel free to change this file to fit your needs.
|
||||
##########################################################################
|
||||
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
This is a Powershell script to bootstrap a Cake build.
|
||||
|
||||
.DESCRIPTION
|
||||
This Powershell script will download NuGet if missing, restore NuGet tools (including Cake)
|
||||
and execute your Cake build script with the parameters you provide.
|
||||
|
||||
.PARAMETER Script
|
||||
The build script to execute.
|
||||
.PARAMETER Target
|
||||
The build script target to run.
|
||||
.PARAMETER Configuration
|
||||
The build configuration to use.
|
||||
.PARAMETER Verbosity
|
||||
Specifies the amount of information to be displayed.
|
||||
.PARAMETER ShowDescription
|
||||
Shows description about tasks.
|
||||
.PARAMETER DryRun
|
||||
Performs a dry run.
|
||||
.PARAMETER Experimental
|
||||
Uses the nightly builds of the Roslyn script engine.
|
||||
.PARAMETER Mono
|
||||
Uses the Mono Compiler rather than the Roslyn script engine.
|
||||
.PARAMETER SkipToolPackageRestore
|
||||
Skips restoring of packages.
|
||||
.PARAMETER ScriptArgs
|
||||
Remaining arguments are added here.
|
||||
|
||||
.LINK
|
||||
https://cakebuild.net
|
||||
|
||||
#>
|
||||
|
||||
[CmdletBinding()]
|
||||
Param(
|
||||
[string]$Script = "build.cake",
|
||||
[string]$Target,
|
||||
[string]$Configuration,
|
||||
[ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")]
|
||||
[string]$Verbosity,
|
||||
[switch]$ShowDescription,
|
||||
[Alias("WhatIf", "Noop")]
|
||||
[switch]$DryRun,
|
||||
[switch]$Experimental,
|
||||
[switch]$Mono,
|
||||
[switch]$SkipToolPackageRestore,
|
||||
[Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)]
|
||||
[string[]]$ScriptArgs
|
||||
)
|
||||
|
||||
[Reflection.Assembly]::LoadWithPartialName("System.Security") | Out-Null
|
||||
function MD5HashFile([string] $filePath)
|
||||
{
|
||||
if ([string]::IsNullOrEmpty($filePath) -or !(Test-Path $filePath -PathType Leaf))
|
||||
{
|
||||
return $null
|
||||
}
|
||||
|
||||
[System.IO.Stream] $file = $null;
|
||||
[System.Security.Cryptography.MD5] $md5 = $null;
|
||||
try
|
||||
{
|
||||
$md5 = [System.Security.Cryptography.MD5]::Create()
|
||||
$file = [System.IO.File]::OpenRead($filePath)
|
||||
return [System.BitConverter]::ToString($md5.ComputeHash($file))
|
||||
}
|
||||
finally
|
||||
{
|
||||
if ($file -ne $null)
|
||||
{
|
||||
$file.Dispose()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function GetProxyEnabledWebClient
|
||||
{
|
||||
$wc = New-Object System.Net.WebClient
|
||||
$proxy = [System.Net.WebRequest]::GetSystemWebProxy()
|
||||
$proxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials
|
||||
$wc.Proxy = $proxy
|
||||
return $wc
|
||||
}
|
||||
|
||||
Write-Host "Preparing to run build script..."
|
||||
|
||||
if(!$PSScriptRoot){
|
||||
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
|
||||
}
|
||||
|
||||
$TOOLS_DIR = Join-Path $PSScriptRoot "tools"
|
||||
$ADDINS_DIR = Join-Path $TOOLS_DIR "Addins"
|
||||
$MODULES_DIR = Join-Path $TOOLS_DIR "Modules"
|
||||
$NUGET_EXE = Join-Path $TOOLS_DIR "nuget.exe"
|
||||
$CAKE_EXE = Join-Path $TOOLS_DIR "Cake/Cake.exe"
|
||||
$NUGET_URL = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
|
||||
$PACKAGES_CONFIG = Join-Path $TOOLS_DIR "packages.config"
|
||||
$PACKAGES_CONFIG_MD5 = Join-Path $TOOLS_DIR "packages.config.md5sum"
|
||||
$ADDINS_PACKAGES_CONFIG = Join-Path $ADDINS_DIR "packages.config"
|
||||
$MODULES_PACKAGES_CONFIG = Join-Path $MODULES_DIR "packages.config"
|
||||
|
||||
# Make sure tools folder exists
|
||||
if ((Test-Path $PSScriptRoot) -and !(Test-Path $TOOLS_DIR)) {
|
||||
Write-Verbose -Message "Creating tools directory..."
|
||||
New-Item -Path $TOOLS_DIR -Type directory | out-null
|
||||
}
|
||||
|
||||
# Make sure that packages.config exist.
|
||||
if (!(Test-Path $PACKAGES_CONFIG)) {
|
||||
Write-Verbose -Message "Downloading packages.config..."
|
||||
try {
|
||||
$wc = GetProxyEnabledWebClient
|
||||
$wc.DownloadFile("https://cakebuild.net/download/bootstrapper/packages", $PACKAGES_CONFIG) } catch {
|
||||
Throw "Could not download packages.config."
|
||||
}
|
||||
}
|
||||
|
||||
# Try find NuGet.exe in path if not exists
|
||||
if (!(Test-Path $NUGET_EXE)) {
|
||||
Write-Verbose -Message "Trying to find nuget.exe in PATH..."
|
||||
$existingPaths = $Env:Path -Split ';' | Where-Object { (![string]::IsNullOrEmpty($_)) -and (Test-Path $_ -PathType Container) }
|
||||
$NUGET_EXE_IN_PATH = Get-ChildItem -Path $existingPaths -Filter "nuget.exe" | Select -First 1
|
||||
if ($NUGET_EXE_IN_PATH -ne $null -and (Test-Path $NUGET_EXE_IN_PATH.FullName)) {
|
||||
Write-Verbose -Message "Found in PATH at $($NUGET_EXE_IN_PATH.FullName)."
|
||||
$NUGET_EXE = $NUGET_EXE_IN_PATH.FullName
|
||||
}
|
||||
}
|
||||
|
||||
# Try download NuGet.exe if not exists
|
||||
if (!(Test-Path $NUGET_EXE)) {
|
||||
Write-Verbose -Message "Downloading NuGet.exe..."
|
||||
try {
|
||||
$wc = GetProxyEnabledWebClient
|
||||
$wc.DownloadFile($NUGET_URL, $NUGET_EXE)
|
||||
} catch {
|
||||
Throw "Could not download NuGet.exe."
|
||||
}
|
||||
}
|
||||
|
||||
# Save nuget.exe path to environment to be available to child processed
|
||||
$ENV:NUGET_EXE = $NUGET_EXE
|
||||
|
||||
# Restore tools from NuGet?
|
||||
if(-Not $SkipToolPackageRestore.IsPresent) {
|
||||
Push-Location
|
||||
Set-Location $TOOLS_DIR
|
||||
|
||||
# Check for changes in packages.config and remove installed tools if true.
|
||||
[string] $md5Hash = MD5HashFile($PACKAGES_CONFIG)
|
||||
if((!(Test-Path $PACKAGES_CONFIG_MD5)) -Or
|
||||
($md5Hash -ne (Get-Content $PACKAGES_CONFIG_MD5 ))) {
|
||||
Write-Verbose -Message "Missing or changed package.config hash..."
|
||||
Get-ChildItem -Exclude packages.config,nuget.exe,Cake.Bakery |
|
||||
Remove-Item -Recurse
|
||||
}
|
||||
|
||||
Write-Verbose -Message "Restoring tools from NuGet..."
|
||||
$NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$TOOLS_DIR`""
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Throw "An error occurred while restoring NuGet tools."
|
||||
}
|
||||
else
|
||||
{
|
||||
$md5Hash | Out-File $PACKAGES_CONFIG_MD5 -Encoding "ASCII"
|
||||
}
|
||||
Write-Verbose -Message ($NuGetOutput | out-string)
|
||||
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
# Restore addins from NuGet
|
||||
if (Test-Path $ADDINS_PACKAGES_CONFIG) {
|
||||
Push-Location
|
||||
Set-Location $ADDINS_DIR
|
||||
|
||||
Write-Verbose -Message "Restoring addins from NuGet..."
|
||||
$NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$ADDINS_DIR`""
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Throw "An error occurred while restoring NuGet addins."
|
||||
}
|
||||
|
||||
Write-Verbose -Message ($NuGetOutput | out-string)
|
||||
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
# Restore modules from NuGet
|
||||
if (Test-Path $MODULES_PACKAGES_CONFIG) {
|
||||
Push-Location
|
||||
Set-Location $MODULES_DIR
|
||||
|
||||
Write-Verbose -Message "Restoring modules from NuGet..."
|
||||
$NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$MODULES_DIR`""
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Throw "An error occurred while restoring NuGet modules."
|
||||
}
|
||||
|
||||
Write-Verbose -Message ($NuGetOutput | out-string)
|
||||
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
# Make sure that Cake has been installed.
|
||||
if (!(Test-Path $CAKE_EXE)) {
|
||||
Throw "Could not find Cake.exe at $CAKE_EXE"
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Build Cake arguments
|
||||
$cakeArguments = @("$Script");
|
||||
if ($Target) { $cakeArguments += "-target=$Target" }
|
||||
if ($Configuration) { $cakeArguments += "-configuration=$Configuration" }
|
||||
if ($Verbosity) { $cakeArguments += "-verbosity=$Verbosity" }
|
||||
if ($ShowDescription) { $cakeArguments += "-showdescription" }
|
||||
if ($DryRun) { $cakeArguments += "-dryrun" }
|
||||
if ($Experimental) { $cakeArguments += "-experimental" }
|
||||
if ($Mono) { $cakeArguments += "-mono" }
|
||||
$cakeArguments += $ScriptArgs
|
||||
|
||||
# Start Cake
|
||||
Write-Host "Running build script..."
|
||||
&$CAKE_EXE $cakeArguments
|
||||
exit $LASTEXITCODE
|
|
@ -1,16 +0,0 @@
|
|||
// ******************************************************************
|
||||
// Copyright © 2015-2018 nventive inc. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// ******************************************************************
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Cake" version="0.24.0" />
|
||||
</packages>
|
|
@ -24,7 +24,6 @@ using System.Reflection;
|
|||
using System.Threading;
|
||||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||
using Microsoft.CodeAnalysis.VisualBasic.Syntax;
|
||||
using Uno.CodeGen.ClassLifecycle.Utils;
|
||||
using Uno.SourceGeneration;
|
||||
using ExpressionStatementSyntax = Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionStatementSyntax;
|
||||
|
@ -163,7 +162,7 @@ namespace Uno.CodeGen.ClassLifecycle
|
|||
.Select(parameter =>
|
||||
{
|
||||
var type = parameter.First().Type;
|
||||
var isTypeMismatch = parameter.Any(p => p.Type != type);
|
||||
var isTypeMismatch = parameter.Any(p => !Equals(p.Type, type));
|
||||
|
||||
var isOptional = parameter.All(p => p.IsOptional);
|
||||
var defaultValue = default(object);
|
||||
|
@ -313,7 +312,7 @@ namespace Uno.CodeGen.ClassLifecycle
|
|||
// It is invoking the parameter less contructor we are generating !
|
||||
return declaredParameterlessConstructor == null && initializer.ArgumentList.Arguments.None();
|
||||
}
|
||||
else if (parentConstructor.ContainingSymbol != constructor.ContainingSymbol)
|
||||
else if (!Equals(parentConstructor.ContainingSymbol, constructor.ContainingSymbol))
|
||||
{
|
||||
// Currently we don't support Intialize inheritance (the issue is that as each inheriance layer may add some parameters,
|
||||
// the base class cannot invoke a single method that is overriden by children)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net461;netstandard1.3;netstandard2.0</TargetFrameworks>
|
||||
<TargetFrameworks>net461;netstandard2.0</TargetFrameworks>
|
||||
<IsTool>true</IsTool>
|
||||
<Product>Generator of class lifecycle</Product>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
|
@ -18,14 +18,16 @@ This package is part of the Uno.CodeGen to generate classes lifecycle methods in
|
|||
<PackageProjectUrl>https://github.com/nventive/Uno.CodeGen</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/nventive/Uno.CodeGen</RepositoryUrl>
|
||||
<PackageIconUrl>https://nv-assets.azurewebsites.net/logos/uno.png</PackageIconUrl>
|
||||
<NoWarn>RS1024;NU5118;NU5128</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="..\Uno.Common.props" />
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)'=='net461'">
|
||||
<PackageReference Include="System.ValueTuple" Version="4.4.0" PrivateAssets="all" />
|
||||
<PackageReference Include="Uno.RoslynHelpers" Version="1.2.0-dev.10" PrivateAssets="all" />
|
||||
<PackageReference Include="Uno.SourceGeneration" Version="1.30.0-dev.245" PrivateAssets="all" ExcludeAssets="runtime" />
|
||||
<PackageReference Include="Uno.Roslyn" Version="1.3.0-dev.12" PrivateAssets="all" />
|
||||
<PackageReference Include="Uno.SourceGeneration" Version="4.0.0" PrivateAssets="all" ExcludeAssets="runtime" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis" Version="4.0.1" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -33,8 +35,8 @@ This package is part of the Uno.CodeGen to generate classes lifecycle methods in
|
|||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Uno.SourceGenerationTasks" Version="1.30.0-dev.245" PrivateAssets="none">
|
||||
<NoWarn>NU1701</NoWarn>
|
||||
<PackageReference Include="Uno.SourceGenerationTasks" Version="4.0.0" PrivateAssets="none">
|
||||
<NoWarn>NU1701;RS1024</NoWarn>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ namespace Uno.CodeGen.ClassLifecycle.Utils
|
|||
=> type.FindAttribute(attribute) != null;
|
||||
|
||||
public static AttributeData FindAttribute(this INamedTypeSymbol type, INamedTypeSymbol attributeType)
|
||||
=> type.GetAttributes().FirstOrDefault(attribute => attribute.AttributeClass.Equals(attributeType));
|
||||
=> type.GetAttributes().FirstOrDefault(attribute => Equals(attribute.AttributeClass, attributeType));
|
||||
|
||||
public static SymbolNames GetSymbolNames(this INamedTypeSymbol typeSymbol)
|
||||
{
|
||||
|
@ -163,7 +163,7 @@ namespace Uno.CodeGen.ClassLifecycle.Utils
|
|||
if (disposePattern == null)
|
||||
{
|
||||
}
|
||||
else if (type == sourceType)
|
||||
else if (Equals(type, sourceType))
|
||||
{
|
||||
return (DisposePatternImplementationKind.DisposePattern, disposePattern);
|
||||
}
|
||||
|
@ -219,4 +219,4 @@ namespace Uno.CodeGen.ClassLifecycle.Utils
|
|||
return (DisposeImplementationKind.None, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net461;netstandard2.0;netstandard1.3</TargetFrameworks>
|
||||
|
@ -17,7 +17,8 @@
|
|||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Uno.SourceGenerationTasks" Version="1.30.0-dev.245" />
|
||||
<PackageReference Include="Uno.SourceGenerationTasks" Version="4.0.0" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis" Version="3.3.0" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -26,4 +27,11 @@
|
|||
<ProjectReference Include="..\Uno.Immutables\Uno.Immutables.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Uno.CodeGen\Uno.CodeGen.csproj">
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
|
||||
<UndefineProperties>TargetFramework</UndefineProperties>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<Import Project="..\Uno.CodeGen\build\Uno.CodeGen.props" />
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Uno.SourceGenerationTasks" Version="1.30.0-dev.245" />
|
||||
<PackageReference Include="Uno.SourceGenerationTasks" Version="4.0.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
||||
<PackageReference Include="System.Text.Json" Version="4.7.0" />
|
||||
</ItemGroup>
|
||||
|
@ -23,4 +23,11 @@
|
|||
<ProjectReference Include="..\Uno.Immutables\Uno.Immutables.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Uno.CodeGen\Uno.CodeGen.csproj">
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
|
||||
<UndefineProperties>TargetFramework</UndefineProperties>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
-->
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Uno.SourceGenerationTasks" Version="1.30.0-dev.245" />
|
||||
<PackageReference Include="Uno.SourceGenerationTasks" Version="4.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -29,4 +29,11 @@
|
|||
<ProjectReference Include="..\Uno.Immutables\Uno.Immutables.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Uno.CodeGen\Uno.CodeGen.csproj">
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
|
||||
<UndefineProperties>TargetFramework</UndefineProperties>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -21,14 +21,13 @@
|
|||
<PackageReference Include="System.Text.Json" Version="4.7.0" />
|
||||
<PackageReference Include="StyleCop.Analyzers" Version="1.0.2" />
|
||||
<PackageReference Include="System.ComponentModel.Annotations" Version="4.5.0" />
|
||||
<PackageReference Include="Uno.Core" Version="1.27.0-dev.65" />
|
||||
<PackageReference Include="Uno.Core" Version="4.0.1" />
|
||||
<PackageReference Include="Uno.MonoAnalyzers" Version="1.0.0-dev.4">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Uno.SourceGenerationTasks" Version="1.30.0-dev.245">
|
||||
<PackageReference Include="Uno.SourceGenerationTasks" Version="4.0.0">
|
||||
<NoWarn>NU1701</NoWarn>
|
||||
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
|
@ -49,4 +48,11 @@
|
|||
<Folder Include="Properties\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Uno.CodeGen\Uno.CodeGen.csproj">
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
|
||||
<UndefineProperties>TargetFramework</UndefineProperties>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net461;netstandard1.3;netstandard2.0</TargetFrameworks>
|
||||
<TargetFrameworks>net461;netstandard2.0</TargetFrameworks>
|
||||
<IsTool>true</IsTool>
|
||||
<NoWarn>1701;1702;1705;NU1701</NoWarn>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
|
@ -13,7 +13,7 @@
|
|||
<PackageIconUrl>https://nv-assets.azurewebsites.net/logos/uno.png</PackageIconUrl>
|
||||
<RepositoryUrl>https://github.com/nventive/Uno.CodeGen</RepositoryUrl>
|
||||
<Description>This package provides tooling for code generation.</Description>
|
||||
<Copyright>Copyright (C) 2015-2018 nventive inc. - all rights reserved</Copyright>
|
||||
<Copyright>Copyright (C) 2015-$([System.DateTime]::Now.ToString(`yyyy`)) nventive inc. - all rights reserved</Copyright>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="..\Uno.Common.props" />
|
||||
|
@ -21,16 +21,18 @@
|
|||
<ItemGroup Condition="'$(TargetFramework)'=='net461'">
|
||||
<PackageReference Include="System.ValueTuple" Version="4.4.0" PrivateAssets="all" />
|
||||
<PackageReference Include="Uno.RoslynHelpers" Version="1.2.0-dev.10" PrivateAssets="all" />
|
||||
<PackageReference Include="Uno.SourceGeneration" Version="1.30.0-dev.245" PrivateAssets="all" ExcludeAssets="runtime" />
|
||||
<PackageReference Include="Uno.SourceGeneration" Version="4.0.0" PrivateAssets="all" ExcludeAssets="runtime">
|
||||
<IncludeAssets>compile; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis" Version="2.3.0" PrivateAssets="all" ExcludeAssets="runtime" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis" Version="4.0.1" PrivateAssets="all" ExcludeAssets="runtime" />
|
||||
<PackageReference Include="Uno.MonoAnalyzers" Version="1.0.0-dev.4">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Uno.SourceGenerationTasks" Version="1.30.0-dev.245" PrivateAssets="none">
|
||||
<PackageReference Include="Uno.SourceGenerationTasks" Version="4.0.0" PrivateAssets="none">
|
||||
<NoWarn>NU1701</NoWarn>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(SolutionDir)\crosstargeting_override.props" Condition="exists('$(SolutionDir)\crosstargeting_override.props')" />
|
||||
|
||||
<PropertyGroup>
|
||||
<NoWarn>$(NoWarn);NU5048</NoWarn>
|
||||
<LangVersion>10.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="_OverrideNuget"
|
||||
AfterTargets="AfterBuild"
|
||||
|
@ -31,4 +36,4 @@
|
|||
DestinationFiles="@(_OutputFilesPDB->'$(_TargetNugetFolder)\%(RecursiveDir)%(Filename).pdb')"
|
||||
Condition="'$(_TargetNugetFolder)'!=''" />
|
||||
</Target>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
@ -23,7 +23,7 @@ This package is part of the Uno.CodeGen to generate equality members in your pro
|
|||
<Import Project="..\Uno.Common.props" />
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Uno.MonoAnalyzers" Version="1.0.0-dev.4">
|
||||
<PackageReference Include="Uno.MonoAnalyzers" Version="1.1.0-dev.9">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
|
|
@ -24,7 +24,7 @@ This package is part of the Uno.CodeGen to generate immutable entities in your p
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Diagnostics.Contracts" Version="4.3.0" />
|
||||
<PackageReference Include="Uno.MonoAnalyzers" Version="1.0.0-dev.4">
|
||||
<PackageReference Include="Uno.MonoAnalyzers" Version="1.1.0-dev.9">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
|
|
@ -23,7 +23,7 @@ This package is part of the Uno.CodeGen to generate injectable entities in your
|
|||
<Import Project="..\Uno.Common.props" />
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Uno.MonoAnalyzers" Version="1.0.0-dev.4">
|
||||
<PackageReference Include="Uno.MonoAnalyzers" Version="1.1.0-dev.9">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
|
Загрузка…
Ссылка в новой задаче