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

Always build portable runtime in addition to non-portable. #1433

Merged
merged 41 commits into from
Jan 21, 2020
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
60c221a
First attempt at always having portable.
crummel Jan 8, 2020
617cd42
Make portable build before non-portable.
crummel Jan 8, 2020
b4a2cde
Use conditions on portable dependencies
crummel Jan 8, 2020
f0f0c6f
Add portable versions to Version.Details.xml so we get git commit inf…
crummel Jan 8, 2020
305e074
Move GatherBuiltPackages after targets import so we override it, and …
crummel Jan 8, 2020
5e25e8e
ILAsm/ILDasm aren't produced in the always-portable proj.
crummel Jan 8, 2020
56f0a98
Only want these to build on Linux
crummel Jan 8, 2020
d5e6d49
Try not to break things for ARM.
crummel Jan 8, 2020
f02b33b
Add an override for people who don't want to spend the extra time to …
crummel Jan 8, 2020
37aa616
Exclude symbol packages to cut down on space requirements.
crummel Jan 9, 2020
4098dce
Up some timeouts for additional builds
crummel Jan 9, 2020
fc2619d
More disk space logging
crummel Jan 10, 2020
dbf4140
Try converting to common props for CoreCLR
crummel Jan 10, 2020
1869145
Move built SDKs out of common
crummel Jan 13, 2020
885fbbc
Factor out CoreFX common props
crummel Jan 13, 2020
d6a2401
Factor out common core-setup properties
crummel Jan 13, 2020
ad2bbed
fix missing quote
crummel Jan 13, 2020
6797c5f
another typo
crummel Jan 14, 2020
6136333
Think we might be cleaning too early
crummel Jan 14, 2020
e0a7f27
Fix target name
crummel Jan 14, 2020
5c3a9eb
More target fixes
crummel Jan 14, 2020
757c751
more targets
crummel Jan 14, 2020
6e17ec2
Fix properties
crummel Jan 15, 2020
309c7ad
Think we might need this
crummel Jan 15, 2020
22b7883
Try a different approach
crummel Jan 16, 2020
284bea2
Seems like these can run in either order.
crummel Jan 16, 2020
273700b
Revert "Seems like these can run in either order."
crummel Jan 16, 2020
0c703da
This needs to run for both portable and non-portable
crummel Jan 16, 2020
ad84114
These are also shared
crummel Jan 16, 2020
a491b63
Fix some RID issues
crummel Jan 16, 2020
8d77bed
CopyPackage needs PackageOutputList to be set.
crummel Jan 16, 2020
920675a
More targets that can run in multiple orders.
crummel Jan 16, 2020
cfeec5f
Try with just this
crummel Jan 17, 2020
04d15cb
Package gets skipped
crummel Jan 17, 2020
bfefb64
More fun timing differences on CI vs local
crummel Jan 17, 2020
10b6573
Both?
crummel Jan 17, 2020
50d5f2c
Debugging
crummel Jan 18, 2020
a798c0a
Can't override global properties
crummel Jan 18, 2020
54f154b
empty is not the same as false
crummel Jan 18, 2020
cfad564
Same pattern
crummel Jan 18, 2020
b85a1a2
Try shallow clone and more agressive deletions
crummel Jan 20, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
<Sha>1ed7226e39b7214807318d2cc8ff37492527ffa1</Sha>
<RepoName>coreclr</RepoName>
</Dependency>
<Dependency Name="Microsoft.NETCore.Runtime.CoreCLR" Version="3.1.0-rtm.19564.2" CoherentParentDependency="Microsoft.Private.CoreFx.NETCoreApp">
<Uri>https://github.com/dotnet/coreclr</Uri>
<Sha>1ed7226e39b7214807318d2cc8ff37492527ffa1</Sha>
<RepoName>coreclr-portable</RepoName>
</Dependency>
<Dependency Name="NETStandard.Library" Version="2.1.0" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Uri>https://github.com/dotnet/standard</Uri>
<Sha>a5b5f2e1e369972c8ff1e2183979fab6099f52ef</Sha>
Expand All @@ -41,11 +46,21 @@
<Sha>0f7f38c4fd323b26da10cce95f857f77f0f09b48</Sha>
<RepoName>corefx</RepoName>
</Dependency>
<Dependency Name="Microsoft.Private.CoreFx.NETCoreApp" Version="4.7.0-rtm.19564.4" CoherentParentDependency="Microsoft.NETCore.App">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>0f7f38c4fd323b26da10cce95f857f77f0f09b48</Sha>
<RepoName>corefx-portable</RepoName>
</Dependency>
<Dependency Name="Microsoft.NETCore.App" Version="3.1.0-rtm.19565.2" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Uri>https://github.com/dotnet/core-setup</Uri>
<Sha>65f04fb6db7a5e198d05dbebd5c4ad21eb018f89</Sha>
<RepoName>core-setup</RepoName>
</Dependency>
<Dependency Name="Microsoft.NETCore.App" Version="3.1.0-rtm.19565.2" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Uri>https://github.com/dotnet/core-setup</Uri>
<Sha>65f04fb6db7a5e198d05dbebd5c4ad21eb018f89</Sha>
<RepoName>core-setup-portable</RepoName>
</Dependency>
<Dependency Name="Microsoft.AspNetCore.Mvc.Razor.Extensions" Version="3.1.0" CoherentParentDependency="Microsoft.AspNetCore.App.Ref">
<Uri>https://github.com/aspnet/AspNetCore-Tooling</Uri>
<Sha>29036777e7cd2172a81c45c69e0dc257e8b8184e</Sha>
Expand Down
93 changes: 93 additions & 0 deletions repos/core-setup-portable.proj
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="utf-8"?>
crummel marked this conversation as resolved.
Show resolved Hide resolved
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SourceDirectory>core-setup</SourceDirectory>
</PropertyGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))/dir.props" />

<PropertyGroup>
<BuildArguments>$(FlagParameterPrefix)restore $(FlagParameterPrefix)build</BuildArguments>
<BuildArguments>$(BuildArguments) $(FlagParameterPrefix)configuration $(Configuration)</BuildArguments>
<BuildArguments>$(BuildArguments) $(FlagParameterPrefix)ci</BuildArguments>
<BuildArguments>$(BuildArguments) /p:PortableBuild=true</BuildArguments>
<BuildArguments Condition="$(Platform.Contains('arm')) AND '$(BuildArchitecture)' != 'arm64'">$(BuildArguments) /p:TargetArchitecture=$(Platform) /p:DisableCrossgen=true /p:CrossBuild=true</BuildArguments>
<BuildArguments>$(BuildArguments) /p:BuildDebPackage=false</BuildArguments>
<BuildArguments>$(BuildArguments) /p:BuildAllPackages=true</BuildArguments>
<BuildArguments>$(BuildArguments) /p:RestoreAllBuildRids=false</BuildArguments>
<BuildArguments>$(BuildArguments) /p:OutputRid=linux-$(Platform)</BuildArguments>
<BuildArguments>$(BuildArguments) /p:DotNetOutputBlobFeedDir=$(SourceBuiltBlobFeedDir)</BuildArguments>
<BuildArguments>$(BuildArguments) /m:1</BuildArguments>

<LogVerbosityOptOut>true</LogVerbosityOptOut>
<BuildArguments>$(BuildArguments) $(FlagParameterPrefix)verbosity $(LogVerbosity)</BuildArguments>
<BuildArguments>$(BuildArguments) $(FlagParameterPrefix)binaryLog</BuildArguments>
<BuildArguments>$(BuildArguments) $(FlagParameterPrefix)warnAsError $(ArcadeFalseBoolBuildArg)</BuildArguments>
<BuildArguments>$(BuildArguments) $(FlagParameterPrefix)nodereuse $(ArcadeFalseBoolBuildArg)</BuildArguments>

<BuildCommand>$(ProjectDirectory)/build$(ShellExtension) $(BuildArguments)</BuildCommand>
<BuildCommand Condition="$(Platform.Contains('arm')) AND '$(BuildArchitecture)' != 'arm64'">$(ArmEnvironmentVariables) $(BuildCommand)</BuildCommand>

<OutputPlacementRepoApiImplemented>false</OutputPlacementRepoApiImplemented>
<ShippingPackagesOutput>$(ProjectDirectory)artifacts/packages/$(Configuration)/Shipping/</ShippingPackagesOutput>
<NonShippingPackagesOutput>$(ProjectDirectory)artifacts/packages/$(Configuration)/NonShipping/</NonShippingPackagesOutput>

<NuGetConfigFile>$(ProjectDirectory)/NuGet.config</NuGetConfigFile>
<DependencyVersionInputRepoApiImplemented>true</DependencyVersionInputRepoApiImplemented>

<EnvironmentRestoreSources>$(SourceBuiltPackagesPath)</EnvironmentRestoreSources>
<EnvironmentRestoreSources>$(EnvironmentRestoreSources)%3B$(ShippingPackagesOutput)</EnvironmentRestoreSources>
<EnvironmentRestoreSources>$(EnvironmentRestoreSources)%3B$(NonShippingPackagesOutput)</EnvironmentRestoreSources>
<EnvironmentRestoreSources Condition="'$(OfflineBuild)' == 'true'">$(EnvironmentRestoreSources)%3B$(ReferencePackagesDir)%3B$(PrebuiltPackagesPath)</EnvironmentRestoreSources>
<EnvironmentRestoreSources Condition="'$(OfflineBuild)' != 'true'">$(EnvironmentRestoreSources)%3Bhttps://api.nuget.org/v3/index.json</EnvironmentRestoreSources>
<EnvironmentRestoreSources Condition="'$(OfflineBuild)' != 'true'">$(EnvironmentRestoreSources)%3Bhttps://dotnetfeed.blob.core.windows.net/dotnet-core/index.json</EnvironmentRestoreSources>
<EnvironmentRestoreSources Condition="'$(OfflineBuild)' != 'true'">$(EnvironmentRestoreSources)%3Bhttps://dotnetfeed.blob.core.windows.net/dotnet-tools-internal/index.json</EnvironmentRestoreSources>

<!-- core-setup does not destabilize for intermediate servicing builds -->
<IsStable>true</IsStable>
</PropertyGroup>

<ItemGroup>
<RepositoryReference Include="coreclr" />
<RepositoryReference Include="corefx" />
<RepositoryReference Include="newtonsoft-json" />
<RepositoryReference Include="newtonsoft-json901" />
<RepositoryReference Include="roslyn" />
<RepositoryReference Include="standard" />
</ItemGroup>

<ItemGroup>
<UseSourceBuiltSdkOverride Include="@(ArcadeSdkOverride)" />
<UseSourceBuiltSdkOverride Include="@(ArcadePackagingOverride)" />
</ItemGroup>

<ItemGroup>
<EnvironmentVariables Include="RestoreSources=$(EnvironmentRestoreSources)" />
<EnvironmentVariables Include="BuildInParallel=false" />
</ItemGroup>

<Target Name="SetOutputList" AfterTargets="Package" BeforeTargets="GatherBuiltPackages">
<ItemGroup>
<PackagesOutputList Include="$(ShippingPackagesOutput)" />
<PackagesOutputList Include="$(NonShippingPackagesOutput)" />
</ItemGroup>
</Target>

<Target Name="CleanupRepoForNonPortableBuild" AfterTargets="WriteVersionsFile">
<ItemGroup>
<DirsToDelete Include="$(ProjectDirectory)artifacts" Condition="Exists('$(ProjectDirectory)artifacts')" />
<DirsToDelete Include="$(ProjectDirectory)bin" Condition="Exists('$(ProjectDirectory)bin')" />
</ItemGroup>

<RemoveDir Directories="@(DirsToDelete)" />
</Target>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))/dir.targets" />

<Target Name="GatherBuiltPackages">
<ItemGroup>
<_BuiltPackages Include="$(ShippingPackagesOutput)/*linux*nupkg" Exclude="$(ShippingPackagesOutput)/*.symbols.nupkg" />
<_BuiltPackages Include="$(NonShippingPackagesOutput)/*linux*nupkg" Exclude="$(NonShippingPackagesOutput)/*.symbols.nupkg" />
</ItemGroup>
</Target>
</Project>
1 change: 1 addition & 0 deletions repos/core-setup.proj
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
<RepositoryReference Include="newtonsoft-json901" />
<RepositoryReference Include="roslyn" />
<RepositoryReference Include="standard" />
<RepositoryReference Include="core-setup-portable" Condition="'$(PortableBuild)' != 'true' and '$(TargetOS)' == 'Linux' and '$(SkipPortableRuntimeBuild)' != 'true'" />
</ItemGroup>

<ItemGroup>
Expand Down
73 changes: 73 additions & 0 deletions repos/coreclr-portable.proj
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SourceDirectory>coreclr</SourceDirectory>
</PropertyGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))/dir.props" />

<PropertyGroup>
<BuildArguments>$(Platform) $(Configuration) skiptests</BuildArguments>
<BuildArguments Condition="'$(OS)' != 'Windows_NT'">$(BuildArguments) -ignoreWarnings</BuildArguments>
<BuildArguments>$(BuildArguments) -skipmanagedtools</BuildArguments>
<BuildArguments Condition="'$(OS)' != 'Windows_NT'">$(BuildArguments) -skiprestore</BuildArguments>
<BuildArguments Condition="'$(SkipDisablePgo)' != 'true'">$(BuildArguments) -nopgooptimize</BuildArguments>
<BuildArguments Condition="'$(OS)' != 'Windows_NT'">$(BuildArguments) msbuildonunsupportedplatform</BuildArguments>
<BuildArguments Condition="$(Platform.Contains('arm')) AND '$(BuildArchitecture)' != 'arm64' ">$(BuildArguments) skipnuget cross -skiprestore cmakeargs -DFEATURE_GDBJIT=TRUE</BuildArguments>

<BuildArguments>$(BuildArguments) /bl</BuildArguments>
<BuildArguments>$(BuildArguments) /p:ILLinkTrimAssembly=false</BuildArguments>
<BuildArguments>$(BuildArguments) /p:CheckCDefines=false</BuildArguments>
<BuildArguments>$(BuildArguments) /p:PackagesDir=$(PackagesDir)</BuildArguments>
<BuildArguments>$(BuildArguments) /p:ContinuousIntegrationBuild=true</BuildArguments>
<BuildArguments>$(BuildArguments) /p:VersionSuffix="$(PreReleaseVersionLabel)"</BuildArguments>
<BuildArguments Condition="'$(OS)' != 'Windows_NT'">$(BuildArguments) -warnAsError:0</BuildArguments>

<BuildCommand>$(ProjectDirectory)/build$(ShellExtension) $(BuildArguments)</BuildCommand>

<BuildCommand Condition="$(Platform.Contains('arm')) AND '$(BuildArchitecture)' != 'arm64' ">$(ArmEnvironmentVariables) $(BuildCommand)</BuildCommand>

<CleanCommand>$(ProjectDirectory)/clean$(ShellExtension)</CleanCommand>

<OutputPlacementRepoApiImplemented>false</OutputPlacementRepoApiImplemented>
<PackagesOutput>$(ProjectDirectory)bin/Product/$(TargetOS).$(Platform).$(Configuration)/.nuget/pkg</PackagesOutput>
<NuGetConfigFile>$(ProjectDirectory)/NuGet.config</NuGetConfigFile>

<EnvironmentRestoreSources>$(SourceBuiltPackagesPath)</EnvironmentRestoreSources>
<EnvironmentRestoreSources Condition="'$(OfflineBuild)' == 'true'">$(EnvironmentRestoreSources)%3B$(ReferencePackagesDir)%3B$(PrebuiltPackagesPath)</EnvironmentRestoreSources>
<EnvironmentRestoreSources Condition="'$(OfflineBuild)' != 'true'">$(EnvironmentRestoreSources)%3Bhttps://api.nuget.org/v3/index.json</EnvironmentRestoreSources>
<EnvironmentRestoreSources Condition="'$(OfflineBuild)' != 'true'">$(EnvironmentRestoreSources)%3Bhttps://dotnetfeed.blob.core.windows.net/dotnet-core/index.json</EnvironmentRestoreSources>
<EnvironmentRestoreSources Condition="'$(OfflineBuild)' != 'true'">$(EnvironmentRestoreSources)%3Bhttps://dotnetfeed.blob.core.windows.net/dotnet-tools-internal/index.json</EnvironmentRestoreSources>
</PropertyGroup>

<ItemGroup>
<UseSourceBuiltSdkOverride Include="@(ArcadeSdkOverride)" />
<UseSourceBuiltSdkOverride Include="@(ArcadeConfigurationOverride)" />
</ItemGroup>

<ItemGroup>
<RepositoryReference Include="linker" />
<RepositoryReference Include="roslyn" />
</ItemGroup>

<ItemGroup>
<EnvironmentVariables Include="RestoreSources=$(EnvironmentRestoreSources)" />
</ItemGroup>

<Target Name="CleanupRepoForNonPortableBuild" AfterTargets="WriteVersionsFile">
<ItemGroup>
<DirsToDelete Include="$(ProjectDirectory)artifacts" Condition="Exists('$(ProjectDirectory)artifacts')" />
<DirsToDelete Include="$(ProjectDirectory)bin" Condition="Exists('$(ProjectDirectory)bin')" />
</ItemGroup>

<RemoveDir Directories="@(DirsToDelete)" />
</Target>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))/dir.targets" />

<Target Name="GatherBuiltPackages">
<ItemGroup>
<_BuiltPackages Include="$(PackagesOutput)/*linux*nupkg" Exclude="$(PackagesOutput)/*.symbols.nupkg"/>
</ItemGroup>
</Target>
</Project>
1 change: 1 addition & 0 deletions repos/coreclr.proj
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
<ItemGroup>
<RepositoryReference Include="linker" />
<RepositoryReference Include="roslyn" />
<RepositoryReference Include="coreclr-portable" Condition="'$(PortableBuild)' != 'true' and '$(TargetOS)' == 'Linux' and '$(SkipPortableRuntimeBuild)' != 'true'" />
</ItemGroup>

<ItemGroup>
Expand Down
119 changes: 119 additions & 0 deletions repos/corefx-portable.proj
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SourceDirectory>corefx</SourceDirectory>
</PropertyGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))/dir.props" />

<PropertyGroup>
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>

<BuildArguments>$(FlagParameterPrefix)configuration $(Configuration)</BuildArguments>
<BuildArguments>$(BuildArguments) $(FlagParameterPrefix)restore $(FlagParameterPrefix)build $(FlagParameterPrefix)pack /p:SkipTests=true</BuildArguments>
<BuildArguments>$(BuildArguments) /p:ArchGroup=$(Platform)</BuildArguments>
<BuildArguments>$(BuildArguments) /p:ConfigurationGroup=$(Configuration)</BuildArguments>
<BuildArguments>$(BuildArguments) /p:PackageRid=linux-$(Platform)</BuildArguments>
<!-- CoreFX parses this argument for a OS "family", i.e. rhel.7 to rhel. OSX doesn't have the extra identifier so we need to include the
"-x64" so CoreFX can find a character to break on (digits, hyphen, period). -->
<BuildArguments Condition="'$(TargetOS)' != 'OSX'">$(BuildArguments) /p:RuntimeOS=linux</BuildArguments>
<BuildArguments>$(BuildArguments) /p:PortableBuild=true</BuildArguments>
<BuildArguments>$(BuildArguments) /p:ILAsmToolPath=$(ToolPackageExtractDir)coreclr-tools/</BuildArguments>
<BuildArguments>$(BuildArguments) /p:EnableVSTestReferences=false</BuildArguments>
<BuildArguments>$(BuildArguments) /p:ILLinkTrimAssembly=false</BuildArguments>
<BuildArguments>$(BuildArguments) /p:BuildAllPackages=true</BuildArguments>
<BuildArguments Condition="'$(OfflineBuild)' != 'true'">$(BuildArguments) /p:DotNetSourceBuildIntermediatePath=$(GeneratedSourcePathOnline)</BuildArguments>
<BuildArguments Condition="'$(OfflineBuild)' == 'true'">$(BuildArguments) /p:DotNetSourceBuildIntermediatePath=$(GeneratedSourcePathOffline)</BuildArguments>
<BuildArguments Condition="'$(OfflineBuild)' == 'true'">$(BuildArguments) /p:MicrosoftNETCoreDotNetHostPackageVersion=$(DOTNET_HOST_BOOTSTRAP_VERSION)</BuildArguments>
<BuildArguments Condition="'$(OfflineBuild)' == 'true'">$(BuildArguments) /p:MicrosoftNETCoreDotNetHostPolicyPackageVersion=$(DOTNET_HOST_BOOTSTRAP_VERSION)</BuildArguments>

<LogVerbosityOptOut>true</LogVerbosityOptOut>
<BuildArguments>$(BuildArguments) $(FlagParameterPrefix)verbosity $(LogVerbosity)</BuildArguments>
<BuildArguments>$(BuildArguments) $(FlagParameterPrefix)binaryLog</BuildArguments>
<BuildArguments>$(BuildArguments) $(FlagParameterPrefix)ci</BuildArguments>
<BuildArguments Condition="'$(OS)' != 'Windows_NT'">$(BuildArguments) -warnAsError:0</BuildArguments>

<!--
Disable node reuse (in the new/Arcade way) to avoid errors like this:

error MSB4062: The "Microsoft.CodeAnalysis.BuildTasks.Csc" task could not be loaded from the
assembly .../build/../tools/Microsoft.Build.Tasks.CodeAnalysis.dll. Assembly with same name
is already loaded
-->
<BuildArguments>$(BuildArguments) $(FlagParameterPrefix)nodereuse $(ArcadeFalseBoolBuildArg) $(FlagParameterPrefix)ci</BuildArguments>

<BuildCommand>$(ProjectDirectory)/build$(ShellExtension) $(BuildArguments)</BuildCommand>
<BuildCommand Condition="$(Platform.Contains('arm')) AND '$(BuildArchitecture)' != 'arm64'">$(ArmEnvironmentVariables) $(BuildCommand)</BuildCommand>

<OutputPlacementRepoApiImplemented>false</OutputPlacementRepoApiImplemented>
<ShippingPackagesOutput>$(ProjectDirectory)artifacts/packages/$(Configuration)/Shipping/</ShippingPackagesOutput>
<NonShippingPackagesOutput>$(ProjectDirectory)artifacts/packages/$(Configuration)/NonShipping/</NonShippingPackagesOutput>

<CleanCommand>$(ProjectDirectory)/clean$(ShellExtension)</CleanCommand>

<NuGetConfigFile>$(ProjectDirectory)/NuGet.config</NuGetConfigFile>
<EnvironmentRestoreSources>$(SourceBuiltPackagesPath)</EnvironmentRestoreSources>
<EnvironmentRestoreSources Condition="'$(OfflineBuild)' == 'true'">$(EnvironmentRestoreSources)%3B$(ReferencePackagesDir)%3B$(PrebuiltPackagesPath)</EnvironmentRestoreSources>
<EnvironmentRestoreSources Condition="'$(OfflineBuild)' != 'true'">$(EnvironmentRestoreSources)%3Bhttps://api.nuget.org/v3/index.json</EnvironmentRestoreSources>
<EnvironmentRestoreSources Condition="'$(OfflineBuild)' != 'true'">$(EnvironmentRestoreSources)%3Bhttps://dotnetfeed.blob.core.windows.net/dotnet-core/index.json</EnvironmentRestoreSources>
<EnvironmentRestoreSources Condition="'$(OfflineBuild)' != 'true'">$(EnvironmentRestoreSources)%3Bhttps://dotnetfeed.blob.core.windows.net/dotnet-tools-internal/index.json</EnvironmentRestoreSources>
</PropertyGroup>

<ItemGroup>
<UseSourceBuiltSdkOverride Include="@(ArcadeSdkOverride)" />
<UseSourceBuiltSdkOverride Include="@(ArcadeConfigurationOverride)" />
<UseSourceBuiltSdkOverride Include="@(ArcadeCoreFxTestingOverride)" />
<UseSourceBuiltSdkOverride Include="@(ILSdkOverride)" />
</ItemGroup>

<ItemGroup>
<RepositoryReference Include="arcade" />
<RepositoryReference Include="linker" />
<RepositoryReference Include="coreclr" />
<RepositoryReference Include="standard" />
</ItemGroup>

<ItemGroup>
<EnvironmentVariables Include="RestoreSources=$(EnvironmentRestoreSources)" />
</ItemGroup>

<Target Name="SetOutputList" AfterTargets="Package" BeforeTargets="GatherBuiltPackages">
<ItemGroup>
<PackagesOutputList Include="$(ShippingPackagesOutput)" />
<PackagesOutputList Include="$(NonShippingPackagesOutput)" />
</ItemGroup>
</Target>

<Target Name="CleanupRepoForNonPortableBuild" AfterTargets="WriteVersionsFile">
<ItemGroup>
<DirsToDelete Include="$(ProjectDirectory)artifacts" Condition="Exists('$(ProjectDirectory)artifacts')" />
<DirsToDelete Include="$(ProjectDirectory)bin" Condition="Exists('$(ProjectDirectory)bin')" />
</ItemGroup>

<RemoveDir Directories="@(DirsToDelete)" />
</Target>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))/dir.targets" />

<Target Name="GatherBuiltPackages">
<ItemGroup>
<_BuiltPackages Include="$(ShippingPackagesOutput)/*linux*nupkg" Exclude="$(ShippingPackagesOutput)/*.symbols.nupkg" />
<_BuiltPackages Include="$(NonShippingPackagesOutput)/*linux*nupkg" Exclude="$(NonShippingPackagesOutput)/*.symbols.nupkg" />
</ItemGroup>
</Target>

<UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="AddRidToRuntimeJson" />

<Target Name="UpdateRuntimeGraph"
BeforeTargets="Build"
Condition="'$(_IsBootstrapping)' == 'true'">
<PropertyGroup>
<RuntimeJsonFile>$(ProjectDirectory)pkg/Microsoft.NETCore.Platforms/runtime.json</RuntimeJsonFile>
</PropertyGroup>

<Message Importance="High" Text="Adding rid, $(TargetRid), to $(RuntimeJsonFile)" />
<AddRidToRuntimeJson RuntimeJson="$(RuntimeJsonFile)"
Rid="$(TargetRid)-$(Platform)" />
</Target>

</Project>
Loading