feat: Upgrade UWPSyncGenerator to Roslyn 3.6.0
This commit is contained in:
Родитель
9ba15375a1
Коммит
3a8f8b9621
|
@ -149,13 +149,13 @@
|
|||
</Target>
|
||||
|
||||
<Target Name="GenerateDoc" DependsOnTargets="BuildSyncGenerator">
|
||||
<Exec Command="..\src\Uno.UWPSyncGenerator\Bin\Release\net461\Uno.UWPSyncGenerator.exe "doc"" />
|
||||
<Exec Command="..\src\Uno.UWPSyncGenerator\Bin\Release\Uno.UWPSyncGenerator.exe "doc"" />
|
||||
<Exec Command="$(Pkgdocfx_console)\tools\docfx.exe ..\doc\docfx.json -o $(OutputDir)\doc" />
|
||||
</Target>
|
||||
|
||||
<Target Name="RunAPISyncTool" DependsOnTargets="BuildSyncGenerator">
|
||||
|
||||
<Exec Command="..\src\Uno.UWPSyncGenerator\Bin\Release\net461\Uno.UWPSyncGenerator.exe "sync"" />
|
||||
<Exec Command="..\src\Uno.UWPSyncGenerator\Bin\Release\Uno.UWPSyncGenerator.exe "sync"" />
|
||||
</Target>
|
||||
|
||||
<Target Name="PublishVisx" Condition="'$(UNO_UWP_BUILD)'=='true'">
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
declare const require: any;
|
||||
declare const config: any;
|
||||
declare namespace Uno.UI {
|
||||
import AnimationData = Lottie.AnimationData;
|
||||
interface LottieAnimationProperties {
|
||||
|
|
|
@ -174,7 +174,7 @@ var Uno;
|
|||
action(Lottie._player);
|
||||
}
|
||||
else {
|
||||
require(["lottie"], (p) => {
|
||||
require([`${config.uno_app_base}/lottie`], (p) => {
|
||||
if (!Lottie._player) {
|
||||
Lottie._player = p;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
declare const require: any;
|
||||
declare const config: any;
|
||||
|
||||
namespace Uno.UI {
|
||||
import AnimationData = Lottie.AnimationData;
|
||||
|
@ -242,7 +243,7 @@ namespace Uno.UI {
|
|||
if (Lottie._player) {
|
||||
action(Lottie._player);
|
||||
} else {
|
||||
require(["lottie"], (p: LottiePlayer) => {
|
||||
require([`${config.uno_app_base}/lottie`], (p: LottiePlayer) => {
|
||||
if (!Lottie._player) {
|
||||
Lottie._player = p;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require(["Uno.UI"], () => {
|
||||
require([`${config.uno_app_base}/Uno.UI`], () => {
|
||||
MonoSupport.jsCallDispatcher.registerScope("TSBindingsUnitTests", new TSBindingsTests());
|
||||
});
|
||||
class TSBindingsTests {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require(["Uno.UI"], () => {
|
||||
require([`${config.uno_app_base}/Uno.UI`], () => {
|
||||
|
||||
MonoSupport.jsCallDispatcher.registerScope("TSBindingsUnitTests", new TSBindingsTests());
|
||||
|
||||
|
|
|
@ -114,6 +114,7 @@ declare namespace MonoSupport {
|
|||
private static getMethodMapId;
|
||||
}
|
||||
}
|
||||
declare const config: any;
|
||||
declare namespace Uno.UI {
|
||||
class WindowManager {
|
||||
private containerElementId;
|
||||
|
|
|
@ -1734,7 +1734,7 @@ var Uno;
|
|||
WindowManager.MAX_HEIGHT = `${Number.MAX_SAFE_INTEGER}vh`;
|
||||
UI.WindowManager = WindowManager;
|
||||
if (typeof define === "function") {
|
||||
define(["AppManifest"], () => {
|
||||
define([`${config.uno_app_base}/AppManifest`], () => {
|
||||
});
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
|
||||
declare const config: any;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
namespace Uno.UI {
|
||||
|
||||
|
@ -1829,7 +1830,7 @@ namespace Uno.UI {
|
|||
|
||||
if (typeof define === "function") {
|
||||
define(
|
||||
["AppManifest"],
|
||||
[`${config.uno_app_base}/AppManifest`],
|
||||
() => {
|
||||
}
|
||||
);
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace Uno.UWPSyncGenerator
|
|||
/// </summary>
|
||||
class DocGenerator : Generator
|
||||
{
|
||||
private const string DocPath = @"..\..\..\..\..\doc\articles";
|
||||
private const string DocPath = @"..\..\..\..\doc\articles";
|
||||
private const string ImplementedViewsFileName = "implemented-views.md";
|
||||
private const string ImplementedPath = @"./implemented/";
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ namespace Uno.UWPSyncGenerator
|
|||
|
||||
Console.WriteLine($"Generating for {baseName} {sourceAssembly}");
|
||||
|
||||
_referenceCompilation = LoadProject(@"..\..\..\..\Uno.UWPSyncGenerator.Reference\Uno.UWPSyncGenerator.Reference.csproj");
|
||||
_referenceCompilation = LoadProject(@"..\..\..\Uno.UWPSyncGenerator.Reference\Uno.UWPSyncGenerator.Reference.csproj");
|
||||
_iOSCompilation = LoadProject($@"{basePath}\{baseName}.csproj", "xamarinios10");
|
||||
_androidCompilation = LoadProject($@"{basePath}\{baseName}.csproj", "MonoAndroid10.0");
|
||||
_net461Compilation = LoadProject($@"{basePath}\{baseName}.csproj", "net461");
|
||||
|
@ -162,7 +162,7 @@ namespace Uno.UWPSyncGenerator
|
|||
{
|
||||
if (type.ContainingAssembly.Name == "Windows.Foundation.FoundationContract")
|
||||
{
|
||||
return @"..\..\..\..\Uno.Foundation\Generated\2.0.0.0";
|
||||
return @"..\..\..\Uno.Foundation\Generated\2.0.0.0";
|
||||
}
|
||||
else if (!(
|
||||
type.ContainingNamespace.ToString().StartsWith("Windows.UI.Xaml")
|
||||
|
@ -173,11 +173,11 @@ namespace Uno.UWPSyncGenerator
|
|||
#endif
|
||||
))
|
||||
{
|
||||
return @"..\..\..\..\Uno.UWP\Generated\3.0.0.0";
|
||||
return @"..\..\..\Uno.UWP\Generated\3.0.0.0";
|
||||
}
|
||||
else
|
||||
{
|
||||
return @"..\..\..\..\Uno.UI\Generated\3.0.0.0";
|
||||
return @"..\..\..\Uno.UI\Generated\3.0.0.0";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -304,14 +304,22 @@ namespace Uno.UWPSyncGenerator
|
|||
}
|
||||
|
||||
private PlatformSymbols<ISymbol> GetAllGetNonGeneratedMembers(PlatformSymbols<INamedTypeSymbol> types, string name, Func<IEnumerable<ISymbol>, ISymbol> filter, ISymbol uapSymbol = null)
|
||||
=> new PlatformSymbols<ISymbol>(
|
||||
filter(GetNonGeneratedMembers(types.AndroidSymbol, name)),
|
||||
filter(GetNonGeneratedMembers(types.IOSSymbol, name)),
|
||||
filter(GetNonGeneratedMembers(types.MacOSSymbol, name)),
|
||||
filter(GetNonGeneratedMembers(types.net461ymbol, name)),
|
||||
filter(GetNonGeneratedMembers(types.WasmSymbol, name)),
|
||||
{
|
||||
var android = GetNonGeneratedMembers(types.AndroidSymbol, name);
|
||||
var ios = GetNonGeneratedMembers(types.IOSSymbol, name);
|
||||
var macOS = GetNonGeneratedMembers(types.MacOSSymbol, name);
|
||||
var net461 = GetNonGeneratedMembers(types.net461ymbol, name);
|
||||
var wasm = GetNonGeneratedMembers(types.WasmSymbol, name);
|
||||
|
||||
return new PlatformSymbols<ISymbol>(
|
||||
filter(android),
|
||||
filter(ios),
|
||||
filter(macOS),
|
||||
filter(net461),
|
||||
filter(wasm),
|
||||
uapType: uapSymbol
|
||||
);
|
||||
}
|
||||
|
||||
protected PlatformSymbols<IMethodSymbol> GetAllMatchingMethods(PlatformSymbols<INamedTypeSymbol> types, IMethodSymbol method)
|
||||
=> new PlatformSymbols<IMethodSymbol>(
|
||||
|
@ -1484,6 +1492,7 @@ namespace Uno.UWPSyncGenerator
|
|||
//{ "BuildingInsideVisualStudio", "true" },
|
||||
{ "SkipUnoResourceGeneration", "true" }, // Required to avoid loading a non-existent task
|
||||
{ "DocsGeneration", "true" }, // Detect that source generation is running
|
||||
{ "LangVersion", "8.0" },
|
||||
//{ "DesignTimeBuild", "true" },
|
||||
//{ "UseHostCompilerIfAvailable", "false" },
|
||||
//{ "UseSharedCompilation", "false" },
|
||||
|
|
|
@ -65,6 +65,7 @@ namespace Uno.SourceGeneration.Host
|
|||
properties["Configuration"] = configuration;
|
||||
properties["UseHostCompilerIfAvailable"] = "true";
|
||||
properties["UseSharedCompilation"] = "true";
|
||||
properties["LangVersion"] = "8.0";
|
||||
|
||||
// Platform is intentionally kept as not defined, to avoid having
|
||||
// dependent projects being loaded with a platform they don't support.
|
||||
|
|
|
@ -27,26 +27,26 @@ namespace Uno.UWPSyncGenerator
|
|||
|
||||
if (mode == SyncMode || mode == AllMode)
|
||||
{
|
||||
new SyncGenerator().Build(@"..\..\..\..\Uno.Foundation", "Uno.Foundation", "Windows.Foundation.FoundationContract");
|
||||
new SyncGenerator().Build(@"..\..\..\..\Uno.UWP", "Uno", "Windows.Foundation.UniversalApiContract");
|
||||
new SyncGenerator().Build(@"..\..\..\..\Uno.UWP", "Uno", "Windows.Phone.PhoneContract");
|
||||
new SyncGenerator().Build(@"..\..\..\..\Uno.UWP", "Uno", "Windows.Networking.Connectivity.WwanContract");
|
||||
new SyncGenerator().Build(@"..\..\..\..\Uno.UWP", "Uno", "Windows.ApplicationModel.Calls.CallsPhoneContract");
|
||||
new SyncGenerator().Build(@"..\..\..\Uno.Foundation", "Uno.Foundation", "Windows.Foundation.FoundationContract");
|
||||
new SyncGenerator().Build(@"..\..\..\Uno.UWP", "Uno", "Windows.Foundation.UniversalApiContract");
|
||||
new SyncGenerator().Build(@"..\..\..\Uno.UWP", "Uno", "Windows.Phone.PhoneContract");
|
||||
new SyncGenerator().Build(@"..\..\..\Uno.UWP", "Uno", "Windows.Networking.Connectivity.WwanContract");
|
||||
new SyncGenerator().Build(@"..\..\..\Uno.UWP", "Uno", "Windows.ApplicationModel.Calls.CallsPhoneContract");
|
||||
|
||||
#if HAS_UNO_WINUI
|
||||
new SyncGenerator().Build(@"..\..\..\..\Uno.UI", "Uno.UI", "Microsoft.UI");
|
||||
new SyncGenerator().Build(@"..\..\..\..\Uno.UI", "Uno.UI", "Microsoft.System");
|
||||
new SyncGenerator().Build(@"..\..\..\Uno.UI", "Uno.UI", "Microsoft.UI");
|
||||
new SyncGenerator().Build(@"..\..\..\Uno.UI", "Uno.UI", "Microsoft.System");
|
||||
#else
|
||||
new SyncGenerator().Build(@"..\..\..\..\Uno.UI", "Uno.UI", "Windows.Foundation.UniversalApiContract");
|
||||
new SyncGenerator().Build(@"..\..\..\Uno.UI", "Uno.UI", "Windows.Foundation.UniversalApiContract");
|
||||
#endif
|
||||
}
|
||||
|
||||
if (mode == DocMode || mode == AllMode)
|
||||
{
|
||||
#if HAS_UNO_WINUI
|
||||
new DocGenerator().Build(@"..\..\..\..\Uno.UI", "Uno.UI", "Microsoft.UI");
|
||||
new DocGenerator().Build(@"..\..\..\Uno.UI", "Uno.UI", "Microsoft.UI");
|
||||
#else
|
||||
new DocGenerator().Build(@"..\..\..\..\Uno.UI", "Uno.UI", "Windows.Foundation.UniversalApiContract");
|
||||
new DocGenerator().Build(@"..\..\..\Uno.UI", "Uno.UI", "Windows.Foundation.UniversalApiContract");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net461</TargetFramework>
|
||||
<TargetFramework>net472</TargetFramework>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||
|
@ -29,27 +30,27 @@
|
|||
<Version>15.8.166</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis">
|
||||
<Version>2.9.0</Version>
|
||||
<Version>3.6.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.Common">
|
||||
<Version>2.9.0</Version>
|
||||
<Version>3.6.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp">
|
||||
<Version>2.9.0</Version>
|
||||
<Version>3.6.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces">
|
||||
<Version>2.9.0</Version>
|
||||
<Version>3.6.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic">
|
||||
<Version>2.9.0</Version>
|
||||
<Version>3.6.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces">
|
||||
<Version>2.9.0</Version>
|
||||
<Version>3.6.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common">
|
||||
<Version>2.9.0</Version>
|
||||
<Version>3.6.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="2.9.0" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="3.6.0" />
|
||||
<PackageReference Include="Microsoft.Tpl.Dataflow">
|
||||
<Version>4.5.24</Version>
|
||||
</PackageReference>
|
||||
|
|
Загрузка…
Ссылка в новой задаче