[One .NET] Target net6.0 instead of netcoreapp3.1 (#5891)
Projects which were multitargetd to support .NET 6 have been updated to
target `net6.0` instead of `netcoreapp3.1`. CI has been updated to
install .NET 6 preview 3 instead of .NET 5.
* Bump to xamarin/xamarin-android-tools/main@683f375
Changes: c5732a0e...683f3750
This commit is contained in:
Родитель
0e74266820
Коммит
fefc1510cd
|
@ -33,7 +33,7 @@ namespace Xamarin.Android.Tools.BootstrapTasks
|
|||
|
||||
static readonly string assemblyToValidate = "Mono.Android.dll";
|
||||
|
||||
static readonly string netCoreAppVersion = "netcoreapp3.1";
|
||||
static readonly string netCoreAppVersion = "net6.0";
|
||||
static string compatApiCommand = null;
|
||||
|
||||
// Path where Microsoft.DotNet.ApiCompat nuget package is located
|
||||
|
|
|
@ -40,7 +40,7 @@ variables:
|
|||
InstallerArtifactName: installers-unsigned
|
||||
TestAssembliesArtifactName: test-assemblies
|
||||
DotNetCoreVersion: 3.1.405
|
||||
DotNet5Version: 5.0.201
|
||||
DotNet6Version: 6.0.100-preview.3.21202.5
|
||||
HostedMacImage: macOS-10.15
|
||||
GitHub.Token: $(github--pat--vs-mobiletools-engineering-service2)
|
||||
NUnit.NumberOfTestWorkers: 4
|
||||
|
|
|
@ -27,7 +27,7 @@ variables:
|
|||
EXTRA_MSBUILD_ARGS: /p:AutoProvision=True /p:AutoProvisionUsesSudo=True /p:IgnoreMaxMonoVersion=False
|
||||
PREPARE_FLAGS: PREPARE_CI=1 PREPARE_CI_PR=1
|
||||
DotNetCoreVersion: 3.1.405
|
||||
DotNet5Version: 5.0.201
|
||||
DotNet6Version: 6.0.100-preview.3.21202.5
|
||||
GitHub.Token: $(github--pat--vs-mobiletools-engineering-service2)
|
||||
|
||||
stages:
|
||||
|
@ -54,7 +54,6 @@ stages:
|
|||
|
||||
- template: yaml-templates/use-dot-net.yaml
|
||||
parameters:
|
||||
version: $(DotNet5Version)
|
||||
remove_dotnet: true
|
||||
|
||||
- template: yaml-templates/use-dot-net.yaml
|
||||
|
@ -174,9 +173,6 @@ stages:
|
|||
submodules: recursive
|
||||
|
||||
- template: yaml-templates/use-dot-net.yaml
|
||||
parameters:
|
||||
version: $(DotNet5Version)
|
||||
remove_dotnet: true
|
||||
|
||||
- template: yaml-templates/use-dot-net.yaml
|
||||
parameters:
|
||||
|
|
|
@ -54,7 +54,7 @@ variables:
|
|||
TestAssembliesArtifactName: test-assemblies
|
||||
NUnitConsoleVersion: 3.11.1
|
||||
DotNetCoreVersion: 3.1.405
|
||||
DotNet5Version: 5.0.201
|
||||
DotNet6Version: 6.0.100-preview.3.21202.5
|
||||
HostedMacImage: macOS-10.15
|
||||
HostedWinVS2019: Hosted Windows 2019 with VS2019
|
||||
VSEngWinVS2019: Xamarin-Android-Win2019
|
||||
|
@ -193,8 +193,6 @@ stages:
|
|||
displayName: set JI_JAVA_HOME
|
||||
|
||||
- template: yaml-templates\use-dot-net.yaml
|
||||
parameters:
|
||||
version: $(DotNet5Version)
|
||||
|
||||
- template: yaml-templates\use-dot-net.yaml
|
||||
parameters:
|
||||
|
@ -317,8 +315,6 @@ stages:
|
|||
displayName: set JI_JAVA_HOME
|
||||
|
||||
- template: yaml-templates\use-dot-net.yaml
|
||||
parameters:
|
||||
version: $(DotNet5Version)
|
||||
|
||||
- template: yaml-templates\use-dot-net.yaml
|
||||
parameters:
|
||||
|
@ -445,8 +441,6 @@ stages:
|
|||
displayName: delete external xamarin-android submodule
|
||||
|
||||
- template: yaml-templates/use-dot-net.yaml
|
||||
parameters:
|
||||
version: $(DotNet5Version)
|
||||
|
||||
- template: yaml-templates/use-dot-net.yaml
|
||||
parameters:
|
||||
|
@ -1316,6 +1310,10 @@ stages:
|
|||
- checkout: release_scripts
|
||||
clean: true
|
||||
|
||||
- template: yaml-templates/use-dot-net.yaml
|
||||
parameters:
|
||||
remove_dotnet: true
|
||||
|
||||
- template: yaml-templates/use-dot-net.yaml
|
||||
parameters:
|
||||
version: $(DotNetCoreVersion)
|
||||
|
@ -1415,6 +1413,8 @@ stages:
|
|||
- checkout: self
|
||||
submodules: recursive
|
||||
|
||||
- template: yaml-templates/use-dot-net.yaml
|
||||
|
||||
- task: DownloadPipelineArtifact@2
|
||||
inputs:
|
||||
${{ if eq(variables['MicroBuildSignType'], 'Real') }}:
|
||||
|
|
|
@ -8,7 +8,6 @@ steps:
|
|||
|
||||
- template: use-dot-net.yaml
|
||||
parameters:
|
||||
version: $(DotNet5Version)
|
||||
remove_dotnet: true
|
||||
|
||||
- template: use-dot-net.yaml
|
||||
|
|
|
@ -29,13 +29,6 @@ steps:
|
|||
condition: and(succeeded(), eq(variables['agent.os'], 'Windows_NT'))
|
||||
|
||||
- template: use-dot-net.yaml
|
||||
parameters:
|
||||
version: $(DotNet5Version)
|
||||
remove_dotnet: true
|
||||
|
||||
- template: use-dot-net.yaml
|
||||
parameters:
|
||||
version: $(DotNetCoreVersion)
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: build xaprepare
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# We prefer this over the UseDotNet task so that we can always clean up old/unstable versions on disk.
|
||||
|
||||
parameters:
|
||||
version: $(DotNetCoreVersion)
|
||||
version: $(DotNet6Version)
|
||||
remove_dotnet: false
|
||||
|
||||
steps:
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<UsingTask TaskName="GenerateBuildManifest" AssemblyFile="$(_MicrosoftDotNetBuildTasksFeedTaskDir)Microsoft.DotNet.Build.Tasks.Feed.dll" />
|
||||
|
||||
<PropertyGroup>
|
||||
<_MonoAndroidNETOutputDir>$(XAInstallPrefix)xbuild-frameworks\Microsoft.Android\netcoreapp3.1\</_MonoAndroidNETOutputDir>
|
||||
<_MonoAndroidNETOutputDir>$(XAInstallPrefix)xbuild-frameworks\Microsoft.Android\net6.0\</_MonoAndroidNETOutputDir>
|
||||
<_WorkloadResolverFlagFile>$(DotNetPreviewPath)sdk\$(MicrosoftDotnetSdkInternalPackageVersion)\EnableWorkloadResolver.sentinel</_WorkloadResolverFlagFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ core workload sdk packs imported by Microsoft.NET.Workload.Android.
|
|||
DependsOnTargets="ConstructInstallerItems;_GenerateBundledVersions;_GetLicense">
|
||||
<PropertyGroup>
|
||||
<ToolsSourceDir>$(XamarinAndroidSourcePath)bin\Build$(Configuration)\packs\tools\</ToolsSourceDir>
|
||||
<NetCoreAppToolsSourceDir>$(XamarinAndroidSourcePath)bin\$(Configuration)-netcoreapp3.1\</NetCoreAppToolsSourceDir>
|
||||
<NetCoreAppToolsSourceDir>$(XamarinAndroidSourcePath)bin\$(Configuration)-net6.0\</NetCoreAppToolsSourceDir>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<PropertyGroup>
|
||||
<CecilSourceDirectory>$(MSBuildThisFileDirectory)..\..\external\mono\external\cecil</CecilSourceDirectory>
|
||||
<UtilityOutputFullPath>$(MSBuildThisFileDirectory)..\..\bin\$(Configuration)\lib\xamarin.android\xbuild\Xamarin\Android\</UtilityOutputFullPath>
|
||||
<UtilityOutputFullPathCoreApps>$(MSBuildThisFileDirectory)..\..\bin\$(Configuration)-netcoreapp3.1\</UtilityOutputFullPathCoreApps>
|
||||
<UtilityOutputFullPathCoreApps>$(MSBuildThisFileDirectory)..\..\bin\$(Configuration)-net6.0\</UtilityOutputFullPathCoreApps>
|
||||
<XamarinAndroidToolsDirectory>$(MSBuildThisFileDirectory)..\..\external\xamarin-android-tools</XamarinAndroidToolsDirectory>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
<OutputPathAbs Condition=" '$(OutputPathAbs)' == '' ">$(MSBuildProjectDirectory)\$(OutputPath)</OutputPathAbs>
|
||||
<JcwGen>"$(XAInstallPrefix)xbuild\Xamarin\Android\jcw-gen.exe" -v10</JcwGen>
|
||||
<_LibDirs>-L "$(OutputPathAbs.TrimEnd('\'))"</_LibDirs>
|
||||
<_LibDirs Condition=" '$(TargetFramework)' != 'netcoreapp3.1' ">$(_LibDirs) -L "$(OutputPathAbs)..\v1.0" -L "$(OutputPathAbs)..\v1.0\Facades"</_LibDirs>
|
||||
<_LibDirs Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">$(_LibDirs) -L "$(_CorlibDir.TrimEnd('\'))"</_LibDirs>
|
||||
<_LibDirs Condition=" '$(TargetFramework)' != 'net6.0' ">$(_LibDirs) -L "$(OutputPathAbs)..\v1.0" -L "$(OutputPathAbs)..\v1.0\Facades"</_LibDirs>
|
||||
<_LibDirs Condition=" '$(TargetFramework)' == 'net6.0' ">$(_LibDirs) -L "$(_CorlibDir.TrimEnd('\'))"</_LibDirs>
|
||||
<_Out>-o "$(MSBuildProjectDirectory)\$(IntermediateOutputPath)jcw\src"</_Out>
|
||||
</PropertyGroup>
|
||||
<Exec
|
||||
|
|
|
@ -320,7 +320,7 @@ namespace Xamarin.Android.Prepare
|
|||
|
||||
public static string TestBinDir => GetCachedPath (ref testBinDir, () => Path.Combine (Configurables.Paths.BinDirRoot, $"Test{ctx.Configuration}"));
|
||||
public static string BinDir => GetCachedPath (ref binDir, () => Path.Combine (Configurables.Paths.BinDirRoot, ctx.Configuration));
|
||||
public static string NetCoreBinDir => GetCachedPath (ref netCoreBinDir, () => Path.Combine (Configurables.Paths.BinDirRoot, $"{ctx.Configuration}-netcoreapp3.1"));
|
||||
public static string NetCoreBinDir => GetCachedPath (ref netCoreBinDir, () => Path.Combine (Configurables.Paths.BinDirRoot, $"{ctx.Configuration}-net6.0"));
|
||||
public static string BuildBinDir => GetCachedPath (ref buildBinDir, () => Path.Combine (Configurables.Paths.BinDirRoot, $"Build{ctx.Configuration}"));
|
||||
public static string MingwBinDir => GetCachedPath (ref mingwBinDir, () => Path.Combine (ctx.Properties.GetRequiredValue (KnownProperties.AndroidMxeFullPath), "bin"));
|
||||
public static string ProfileAssembliesProjitemsPath => GetCachedPath (ref profileAssembliesProjitemsPath, () => Path.Combine (BuildBinDir, "ProfileAssemblies.projitems"));
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit c5732a0e9f4bd4176f43b0568880cfe453fc78de
|
||||
Subproject commit 683f37508b56c76c24b3287a5687743438625341
|
|
@ -1,4 +1,7 @@
|
|||
{
|
||||
"sdk": {
|
||||
"allowPrerelease": true
|
||||
},
|
||||
"msbuild-sdks": {
|
||||
"Microsoft.Build.NoTargets": "2.0.1",
|
||||
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.20555.6"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\..\Configuration.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<DefineConstants>NET5_LINKER</DefineConstants>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<OutputPath>$(XAInstallPrefix)xbuild\Xamarin\Android\</OutputPath>
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
<Import Project="..\..\Configuration.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Only build for netcoreapp3.1 for $(AndroidLatestStableFrameworkVersion) -->
|
||||
<!-- Only build for net6.0 for $(AndroidLatestStableFrameworkVersion) -->
|
||||
<TargetFrameworks Condition=" '$(AndroidFrameworkVersion)' != '$(AndroidLatestStableFrameworkVersion)' ">monoandroid10</TargetFrameworks>
|
||||
<TargetFrameworks Condition=" '$(AndroidFrameworkVersion)' == '$(AndroidLatestStableFrameworkVersion)' ">monoandroid10;netcoreapp3.1</TargetFrameworks>
|
||||
<TargetFrameworks Condition=" '$(AndroidFrameworkVersion)' == '$(AndroidLatestStableFrameworkVersion)' ">monoandroid10;net6.0</TargetFrameworks>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>..\..\product.snk</AssemblyOriginatorKeyFile>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
|
@ -21,7 +21,7 @@
|
|||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
|
||||
<PropertyGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
|
||||
<OutputPath>$(XAInstallPrefix)xbuild-frameworks\Microsoft.Android\</OutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
|
@ -52,7 +52,7 @@
|
|||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
|
||||
<ProjectReference Include="..\..\external\Java.Interop\src\Java.Interop\Java.Interop.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<Import Project="..\..\Configuration.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>monoandroid10;netcoreapp3.1</TargetFrameworks>
|
||||
<TargetFrameworks>monoandroid10;net6.0</TargetFrameworks>
|
||||
<RootNamespace>Android</RootNamespace>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>..\..\product.snk</AssemblyOriginatorKeyFile>
|
||||
|
@ -41,7 +41,7 @@
|
|||
<OutputPath>$(XAInstallPrefix)xbuild-frameworks\MonoAndroid\$(AndroidFrameworkVersion)\</OutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
|
||||
<PropertyGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
|
||||
<OutputPath>$(XAInstallPrefix)xbuild-frameworks\Microsoft.Android\$(TargetFramework)\</OutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
|
@ -92,7 +92,7 @@
|
|||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
|
||||
<ProjectReference Include="..\..\external\Java.Interop\src\Java.Interop\Java.Interop.csproj" />
|
||||
<EmbeddedResource Include="ILLink/ILLink.LinkAttributes.xml">
|
||||
<LogicalName>ILLink.LinkAttributes.xml</LogicalName>
|
||||
|
@ -375,8 +375,8 @@
|
|||
<Target Name="GetTargetPath" />
|
||||
|
||||
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
|
||||
<!-- Only build the 'netcoreapp3.1' version of 'Mono.Android.dll' once for the latest stable Android version. -->
|
||||
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' And '$(AndroidFrameworkVersion)' != '$(AndroidLatestStableFrameworkVersion)' ">
|
||||
<!-- Only build the 'net6.0' version of 'Mono.Android.dll' once for the latest stable Android version. -->
|
||||
<PropertyGroup Condition=" '$(TargetFramework)' == 'net6.0' And '$(AndroidFrameworkVersion)' != '$(AndroidLatestStableFrameworkVersion)' ">
|
||||
<BuildDependsOn></BuildDependsOn>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
<_PackageVersion>$(ProductVersion)</_PackageVersion>
|
||||
<_PackageVersionBuild>$(XAVersionCommitCount)</_PackageVersionBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
|
||||
<PropertyGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
|
||||
<_PackageVersion>$(AndroidPackVersion)</_PackageVersion>
|
||||
<_PackageVersionBuild>$(PackVersionCommitCount)</_PackageVersionBuild>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
<Compile Include="$(MSBuildThisFileDirectory)Android.App\InstrumentationAttribute.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Android.App\LayoutAttribute.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Java.Interop\IJniNameProviderAttribute.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(TargetFramework)' != 'net5.0' ">
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(TargetFramework)' != 'net6.0' ">
|
||||
<Compile Include="$(MSBuildThisFileDirectory)System.Diagnostics.CodeAnalysis/DynamicallyAccessedMemberTypes.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)System.Diagnostics.CodeAnalysis/DynamicDependencyAttribute.cs" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks>
|
||||
<TargetFrameworks>net472;net6.0</TargetFrameworks>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Xamarin.Android.Tools.JavadocToMDoc</RootNamespace>
|
||||
|
|
Загрузка…
Ссылка в новой задаче