Skip to content

Commit

Permalink
More packaging cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ViktorHofer committed Dec 29, 2020
1 parent 75d5cc3 commit c66da25
Show file tree
Hide file tree
Showing 22 changed files with 40 additions and 118 deletions.
5 changes: 2 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,12 @@
<!-- Keep it in sync with PRERELEASE in eng/native/configureplatform.cmake -->
<IsPrerelease>true</IsPrerelease>
<IsExperimentalAssembly>$(MSBuildProjectName.Contains('Experimental'))</IsExperimentalAssembly>
<IsPrivateAssembly>$(MSBuildProjectName.Contains('Private'))</IsPrivateAssembly>
<!-- Experimental packages should not be stable -->
<SuppressFinalPackageVersion Condition="'$(SuppressFinalPackageVersion)' == '' and $(IsExperimentalAssembly)">true</SuppressFinalPackageVersion>
<SuppressFinalPackageVersion Condition="'$(SuppressFinalPackageVersion)' == '' and ($(IsExperimentalAssembly) or $(IsPrivateAssembly))">true</SuppressFinalPackageVersion>
<IsShippingAssembly Condition="$(IsExperimentalAssembly)">false</IsShippingAssembly>
<!-- We don't want Private packages to be shipped to NuGet.org -->
<IsShippingPackage Condition="($(MSBuildProjectName.Contains('Private')) or $(IsExperimentalAssembly)) and '$(MSBuildProjectExtension)' == '.pkgproj'">false</IsShippingPackage>
<!-- Set IsPackable true for all pkgproj as Arcade unconditionally overrides the value. -->
<IsPackable Condition="'$(MSBuildProjectExtension)' == '.pkgproj'">true</IsPackable>
</PropertyGroup>

<!-- Language configuration -->
Expand Down
4 changes: 2 additions & 2 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.20621.12">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.20628.5">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>3ba79fbd73d6765b67d0f75ac9dac148d6bea346</Sha>
</Dependency>
Expand Down Expand Up @@ -38,7 +38,7 @@
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>3ba79fbd73d6765b67d0f75ac9dac148d6bea346</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="6.0.0-beta.20621.12">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="6.0.0-beta.20628.5">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>3ba79fbd73d6765b67d0f75ac9dac148d6bea346</Sha>
</Dependency>
Expand Down
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<MicrosoftDotNetXUnitExtensionsVersion>6.0.0-beta.20621.12</MicrosoftDotNetXUnitExtensionsVersion>
<MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.20621.12</MicrosoftDotNetXUnitConsoleRunnerVersion>
<MicrosoftDotNetBuildTasksArchivesVersion>6.0.0-beta.20621.12</MicrosoftDotNetBuildTasksArchivesVersion>
<MicrosoftDotNetBuildTasksPackagingVersion>6.0.0-beta.20621.12</MicrosoftDotNetBuildTasksPackagingVersion>
<MicrosoftDotNetBuildTasksPackagingVersion>6.0.0-beta.20628.5</MicrosoftDotNetBuildTasksPackagingVersion>
<MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.20621.12</MicrosoftDotNetBuildTasksInstallersVersion>
<MicrosoftDotNetRemoteExecutorVersion>6.0.0-beta.20621.12</MicrosoftDotNetRemoteExecutorVersion>
<MicrosoftDotNetVersionToolsTasksVersion>6.0.0-beta.20621.12</MicrosoftDotNetVersionToolsTasksVersion>
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"msbuild-sdks": {
"Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "6.0.0-beta.20621.12",
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.20621.12",
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.20628.5",
"Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk": "6.0.0-beta.20621.12",
"Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.20621.12",
"Microsoft.DotNet.SharedFramework.Sdk": "6.0.0-beta.20621.12",
Expand Down
29 changes: 22 additions & 7 deletions src/coreclr/.nuget/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,17 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>

<!-- Packaging projects (.pkgproj) are non-SDK-style, so they need to directly import Directory.Build.props -->
<Import Project="../Directory.Build.props" />

<Import Project="..\Directory.Build.props" />
<Import Project="$(NuGetPackageRoot)\microsoft.dotnet.build.tasks.packaging\$(MicrosoftDotNetBuildTasksPackagingVersion)\build\Microsoft.DotNet.Build.Tasks.Packaging.props" />

<Import Project="packaging.props" />

<PropertyGroup>
<!-- defined in Packaging.targets, but we need this before targets are imported -->
<!-- Defined in Packaging.targets, but we need this before targets are imported -->
<PackagePlatform Condition="'$(PackagePlatform)' == ''">$(Platform)</PackagePlatform>
<PackagePlatform Condition="'$(PackagePlatform)' == 'amd64'">x64</PackagePlatform>
<MinOSForArch>win7</MinOSForArch>
<MinOSForArch Condition="'$(PackagePlatform)' == 'arm'">win8</MinOSForArch>
<MinOSForArch Condition="'$(PackagePlatform)' == 'arm64'">win10</MinOSForArch>
<PackagePlatform>AnyCPU</PackagePlatform>

<PackageIndexFile>$(MSBuildThisFileDirectory)packageIndex.json</PackageIndexFile>

<!-- coreclr doesn't currently use the index so don't force it to be in sync -->
<SkipIndexCheck>true</SkipIndexCheck>

<!-- Central place to set the versions of all nuget packages produced in the repo -->
<PackageVersion Condition="'$(PackageVersion)' == ''">6.0.0</PackageVersion>
<StableVersion Condition="'$(StabilizePackageVersion)' == 'true' and '$(StableVersion)' == ''">$(PackageVersion)</StableVersion>
</PropertyGroup>

<ItemGroup>
<PackageIndex Condition="'$(MSBuildProjectExtension)' == '.pkgproj'" Include="$(PackageIndexFile)" />
</ItemGroup>

<PropertyGroup>
<!-- build the transport package which includes product and symbols in addition to standard packages
This is a legacy setting as we tend to use symbol packages for symbol indexing and we don't use
transport packages to flow dependencies anymore -->
Expand Down
7 changes: 2 additions & 5 deletions src/coreclr/.nuget/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<Import Project="../Directory.Build.targets" />

<Project>
<Import Project="..\Directory.Build.targets" />
<Import Project="$(NuGetPackageRoot)\microsoft.dotnet.build.tasks.packaging\$(MicrosoftDotNetBuildTasksPackagingVersion)\build\Microsoft.DotNet.Build.Tasks.Packaging.targets" />

<!--
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
<Project>
<Import Sdk="Microsoft.Build.Traversal" Project="Sdk.props" />

<Project Sdk="Microsoft.Build.Traversal">
<PropertyGroup>
<BuildIdentityPackage>false</BuildIdentityPackage>
<SupportedRids>linux-x64;linux-musl-x64;linux-arm64;linux-musl-arm64;linux-arm;linux-musl-arm</SupportedRids>
</PropertyGroup>

<Target Name="VerifyCrossDacProperties" BeforeTargets="Build">
<Target Name="VerifyCrossDacProperties" BeforeTargets="Build;Pack">
<Error Condition="'$(CrossDacArtifactsDir)' == '' or !Exists('$(CrossDacArtifactsDir)')"
Text="Packaging the Cross OS DAC requires property CrossDacArtifactsDir to to a path containing all cross OS DAC assets needed." />
</Target>

<Target Name="FilterSupportedCrossOsDacPackages" BeforeTargets="Build">
<Target Name="FilterSupportedCrossOsDacPackages" BeforeTargets="Build;Pack">
<ItemGroup>
<_projectsToBuild Include="@(Project)" Condition="$(SupportedRids.Contains('%(Project.PackageTargetRuntime)'))">
<AdditionalProperties Condition="'%(Project.PackageTargetRuntime)' == 'linux-x64'">%(AdditionalProperties);CrossDacBinRoot=$(CrossDacArtifactsDir)/Linux.x64.$(Configuration)/x64</AdditionalProperties>
Expand All @@ -29,8 +27,4 @@
</Target>

<Import Project="$([MSBuild]::GetPathOfFileAbove(versioning.targets))" />
<Import Sdk="Microsoft.Build.Traversal" Project="Sdk.targets" />

<!-- Ordering matters! Overwriting the Pack target which should just invoke Build. -->
<Target Name="Pack" DependsOnTargets="Build" />
</Project>
4 changes: 0 additions & 4 deletions src/coreclr/.nuget/Microsoft.NET.Sdk.IL/sdk/Sdk.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ Copyright (c) .NET Foundation. All rights reserved.
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<MSBuildAllProjects>$(MSBuildThisFileFullPath);$(MSBuildAllProjects)</MSBuildAllProjects>
</PropertyGroup>

<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />

</Project>
1 change: 0 additions & 1 deletion src/coreclr/.nuget/Microsoft.NET.Sdk.IL/sdk/Sdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Copyright (c) .NET Foundation. All rights reserved.
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<MSBuildAllProjects>$(MSBuildThisFileFullPath);$(MSBuildAllProjects)</MSBuildAllProjects>
<LanguageTargets Condition="'$(MSBuildProjectExtension)' == '.ilproj'">$(MSBuildThisFileDirectory)..\targets\Microsoft.NET.Sdk.IL.Common.targets</LanguageTargets>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Copyright (c) .NET Foundation. All rights reserved.
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<MSBuildAllProjects>$(MSBuildThisFileFullPath);$(MSBuildAllProjects)</MSBuildAllProjects>
<DefaultLanguageSourceExtension>.il</DefaultLanguageSourceExtension>
<Language>IL</Language>
<TargetRuntime>Managed</TargetRuntime>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.Build.Traversal">
<ItemGroup>
<!-- identity project, runtime specific projects are included by props above -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.Build.Traversal">
<ItemGroup>
<!-- identity project, runtime specific projects are included by props above -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.Build.Traversal">
<ItemGroup>
<!-- identity project, runtime specific projects are included by props above -->
Expand Down
3 changes: 1 addition & 2 deletions src/coreclr/.nuget/builds.targets
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup Condition="'$(BuildIdentityPackage)' == ''">
<BuildIdentityPackage>true</BuildIdentityPackage>
Expand All @@ -12,7 +11,7 @@
<BuildIdentityPackage Condition="'$(BuildingAnOfficialBuildLeg)' == 'true' AND ('$(OS)' != 'Windows_NT' OR '$(TargetArchitecture)' != 'x64')">false</BuildIdentityPackage>
</PropertyGroup>

<Target Name="FilterProjects" BeforeTargets="Build">
<Target Name="FilterProjects" BeforeTargets="Build;Pack">
<Error Condition="'$(PackageRID)' == ''" Text="'PackageRID' property must be specified."/>

<!-- Only build packages for current RID or non-RID-specific -->
Expand Down
11 changes: 2 additions & 9 deletions src/coreclr/.nuget/coreclr-packages.proj
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<Project>
<Import Sdk="Microsoft.Build.Traversal" Project="Sdk.props" />

<ItemGroup Condition="'$(TargetsWindows)'=='true' OR '$(DotNetBuildFromSource)'=='true'">
<Project Sdk="Microsoft.Build.Traversal" DefaultTargets="Pack">
<ItemGroup Condition="'$(TargetOS)' == 'windows' or '$(DotNetBuildFromSource)' == 'true'">
<ProjectReference Include="Microsoft.NET.Sdk.IL\Microsoft.NET.Sdk.IL.pkgproj" />
<ProjectReference Include="Microsoft.ILVerification\Microsoft.ILVerification.pkgproj" />
<ProjectReference Include="dotnet-ilverify\dotnet-ilverify.pkgproj" />
Expand All @@ -13,10 +11,5 @@
<ProjectReference Include="Microsoft.NETCore.ILDAsm\Microsoft.NETCore.ILDAsm.proj" />
</ItemGroup>


<Import Project="versioning.targets" />
<Import Sdk="Microsoft.Build.Traversal" Project="Sdk.targets" />

<!-- Ordering matters! Overwriting the Pack target which should just invoke Build. -->
<Target Name="Pack" DependsOnTargets="Build" />
</Project>
25 changes: 0 additions & 25 deletions src/coreclr/.nuget/packaging.props

This file was deleted.

2 changes: 1 addition & 1 deletion src/coreclr/.nuget/versioning.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
We depend on this private Arcade target instead of the SDK-defined GetAssemblyVersion since the packaging
build does not use the .NET SDK -->
<Target Name="UpdateAdditionalProperties"
BeforeTargets="Build"
BeforeTargets="Build;Pack"
DependsOnTargets="_InitializeAssemblyVersion">
<ItemGroup>
<!-- Pass the FileVersion calculated by _InitializeAssemblyVersion to referenced projects -->
Expand Down
20 changes: 0 additions & 20 deletions src/coreclr/dir.traversal.targets

This file was deleted.

5 changes: 0 additions & 5 deletions src/libraries/pkg/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,4 @@
<Project Include="@(_project->'$(MSBuildProjectName).pkgproj')" />
</ItemGroup>

<PropertyGroup>
<!-- SuppressFinalPackageVersion on private packages by default -->
<SuppressFinalPackageVersion Condition="'$(SuppressFinalPackageVersion)' == '' and $(MSBuildProjectName.Contains('Private'))">true</SuppressFinalPackageVersion>
</PropertyGroup>

</Project>
4 changes: 0 additions & 4 deletions src/mono/netcore/nuget/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<Project>

<!-- Packaging projects (.pkgproj) are non-SDK-style, so they need to directly import Directory.Build.props -->
<Import Project="..\..\Directory.Build.props" />
<Import Project="$(NuGetPackageRoot)\microsoft.dotnet.build.tasks.packaging\$(MicrosoftDotNetBuildTasksPackagingVersion)\build\Microsoft.DotNet.Build.Tasks.Packaging.props" />
Expand All @@ -13,13 +12,10 @@

<!-- Central place to set the versions of all nuget packages produced in the repo -->
<PackageVersion Condition="'$(PackageVersion)' == ''">6.0.0</PackageVersion>
<!-- Set the boolean below to true to generate packages with stabilized versions -->
<StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion>
<StableVersion Condition="'$(StabilizePackageVersion)' == 'true' and '$(StableVersion)' == ''">$(PackageVersion)</StableVersion>
</PropertyGroup>

<ItemGroup>
<PackageIndex Condition="'$(MSBuildProjectExtension)' == '.pkgproj'" Include="$(PackageIndexFile)" />
</ItemGroup>

</Project>
8 changes: 2 additions & 6 deletions src/mono/netcore/nuget/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<Import Project="../../Directory.Build.targets" />

<Project>
<Import Project="..\..\Directory.Build.targets" />
<Import Project="$(NuGetPackageRoot)\microsoft.dotnet.build.tasks.packaging\$(MicrosoftDotNetBuildTasksPackagingVersion)\build\Microsoft.DotNet.Build.Tasks.Packaging.targets" />

</Project>
10 changes: 1 addition & 9 deletions src/mono/netcore/nuget/mono-packages.proj
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<Project>
<Import Sdk="Microsoft.Build.Traversal" Project="Sdk.props" />

<Project Sdk="Microsoft.Build.Traversal" DefaultTargets="Pack">
<ItemGroup Condition="'$(TargetOS)' == 'Android'">
<ProjectReference Include="Microsoft.NET.Runtime.Android.Sample.Mono\Microsoft.NET.Runtime.Android.Sample.Mono.pkgproj" />
</ItemGroup>
Expand All @@ -13,10 +11,4 @@
<ItemGroup Condition="'$(TargetOS)' == 'iOS'">
<ProjectReference Include="Microsoft.NET.Runtime.iOS.Sample.Mono\Microsoft.NET.Runtime.iOS.Sample.Mono.pkgproj" />
</ItemGroup>

<Import Sdk="Microsoft.Build.Traversal" Project="Sdk.targets" />

<!-- Ordering matters! Overwriting the Pack target which should just invoke Build. -->
<Target Name="Pack" DependsOnTargets="Build">
</Target>
</Project>

0 comments on commit c66da25

Please sign in to comment.