Build runtime specific metapackages

This commit is contained in:
John Luo 2018-03-22 22:57:03 -07:00
parent 414b3d958a
commit ec184bc361
8 changed files with 82 additions and 1 deletions

View File

@ -13,7 +13,9 @@
<Target Name="GetMetapackageArtifactInfo">
<ItemGroup>
<_MetapackageProject Include="$(RepositoryRoot)src\Microsoft.AspNetCore.All\Microsoft.AspNetCore.All.csproj" />
<_MetapackageProject Include="$(RepositoryRoot)src\runtime.win.Microsoft.AspNetCore.All\runtime.win.Microsoft.AspNetCore.All.csproj" />
<_MetapackageProject Include="$(RepositoryRoot)src\Microsoft.AspNetCore.App\Microsoft.AspNetCore.App.csproj" />
<_MetapackageProject Include="$(RepositoryRoot)src\runtime.win.Microsoft.AspNetCore.App\runtime.win.Microsoft.AspNetCore.App.csproj" />
<_MetapackageProject Include="$(RepositoryRoot)src\Microsoft.AspNetCore.Analyzers\Microsoft.AspNetCore.Analyzers.csproj" />
</ItemGroup>
@ -75,6 +77,13 @@
PackageArtifacts="@(PackageArtifact)"
ExternalDependencies="@(ExternalDependency)" />
<!-- Update runtime.json.in -->
<GenerateFileFromTemplate
TemplateFile="$(MetapackageWorkDirectory)runtime.json.in"
OutputPath="$(MetapackageWorkDirectory)runtime.json"
Properties="METAPACKAGE_ID=$(MetapackageName);PACKAGE_VERSION=$(PackageVersion)"
Condition="'$(ProcessRuntimeJson)' == 'true'"/>
<!-- Set _Target=Restore so the project will be re-evaluated to include Internal.AspNetCore.Sdk MSBuild properties on the next step. -->
<MSBuild Projects="$(MetapackageWorkDirectory)$(MetapackageName).csproj" Targets="Restore" Properties="$(CommonProps);_Target=Restore" />
<!-- Pack -->
@ -87,6 +96,15 @@
<AdditionalProperties>
MetapackageName=Microsoft.AspNetCore.App;
MetapackageReferenceType=AppMetapackage;
LockToExactVersions=true;
ProcessRuntimeJson=true
</AdditionalProperties>
</_MetapackageBuilderProject>
<_MetapackageBuilderProject Include="$(MSBuildProjectFullPath)">
<AdditionalProperties>
MetapackageName=runtime.win.Microsoft.AspNetCore.App;
MetapackageReferenceType=WinAppMetapackage;
LockToExactVersions=true
</AdditionalProperties>
</_MetapackageBuilderProject>
@ -95,6 +113,15 @@
<AdditionalProperties>
MetapackageName=Microsoft.AspNetCore.All;
MetapackageReferenceType=AllMetapackage;
LockToExactVersions=false;
ProcessRuntimeJson=true
</AdditionalProperties>
</_MetapackageBuilderProject>
<_MetapackageBuilderProject Include="$(MSBuildProjectFullPath)">
<AdditionalProperties>
MetapackageName=runtime.win.Microsoft.AspNetCore.All;
MetapackageReferenceType=WinAllMetapackage;
LockToExactVersions=false
</AdditionalProperties>
</_MetapackageBuilderProject>

View File

@ -6,6 +6,10 @@
<AppMetapackage>false</AppMetapackage>
<!-- When true, this dependency will be included in the Microsoft.AspNetCore.All metapackage. -->
<AllMetapackage>false</AllMetapackage>
<!-- When true, this dependency will be included in the runtime.win.Microsoft.AspNetCore.App metapackage. -->
<WinAppMetapackage>false</WinAppMetapackage>
<!-- When true, this dependency will be included in the runtime.win.Microsoft.AspNetCore.All metapackage. -->
<WinAllMetapackage>false</WinAllMetapackage>
<!-- When true, this dependency will be included in the Microsoft.AspNetCore.Analyzers metapackage. -->
<Analyzer>false</Analyzer>
<!-- When true, this dependency will be included in the LZMA. -->
@ -142,7 +146,7 @@
<PackageArtifact Include="Microsoft.AspNetCore.Routing.Abstractions" Category="ship" AppMetapackage="true" AllMetapackage="true"/>
<PackageArtifact Include="Microsoft.AspNetCore.Routing.DecisionTree.Sources" Category="noship" />
<PackageArtifact Include="Microsoft.AspNetCore.Server.HttpSys" Category="ship" AppMetapackage="true" AllMetapackage="true"/>
<PackageArtifact Include="Microsoft.AspNetCore.Server.IIS" Category="ship" />
<PackageArtifact Include="Microsoft.AspNetCore.Server.IIS" Category="ship" WinAppMetapackage="true" WinAllMetapackage="true" />
<PackageArtifact Include="Microsoft.AspNetCore.Server.IISIntegration" Category="ship" AppMetapackage="true" AllMetapackage="true"/>
<PackageArtifact Include="Microsoft.AspNetCore.Server.IntegrationTesting" Category="noship" />
<PackageArtifact Include="Microsoft.AspNetCore.Server.Kestrel" Category="ship" AppMetapackage="true" AllMetapackage="true"/>
@ -304,6 +308,8 @@
<PackageArtifact Include="Microsoft.VisualStudio.Web.CodeGenerators.Mvc" Category="ship" LZMA="true" />
<PackageArtifact Include="Microsoft.Web.Xdt.Extensions" Category="shipoob" />
<PackageArtifact Include="RazorPageGenerator" Category="noship" />
<PackageArtifact Include="runtime.win.Microsoft.AspNetCore.App" Category="ship" />
<PackageArtifact Include="runtime.win.Microsoft.AspNetCore.All" Category="ship" />
<PackageArtifact Include="Internal.AspNetCore.Universe.Lineup" Category="noship" PackageType="Lineup" />
</ItemGroup>

View File

@ -15,6 +15,7 @@
<Content Include="build\$(TargetFramework)\*.props" PackagePath="%(Identity)" />
<Content Include="build\$(TargetFramework)\*.targets" PackagePath="%(Identity)" />
<Content Include="lib\$(TargetFramework)\_._" PackagePath="%(Identity)" />
<Content Include="runtime.json" PackagePath="%(Identity)" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,9 @@
{
"runtimes": {
"win": {
"${METAPACKAGE_ID}": {
"runtime.win.${METAPACKAGE_ID}": "${PACKAGE_VERSION}"
}
}
}
}

View File

@ -15,6 +15,7 @@
<Content Include="build\$(TargetFramework)\*.props" PackagePath="%(Identity)" />
<Content Include="build\$(TargetFramework)\*.targets" PackagePath="%(Identity)" />
<Content Include="lib\$(TargetFramework)\_._" PackagePath="%(Identity)" />
<Content Include="runtime.json" PackagePath="%(Identity)" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,9 @@
{
"runtimes": {
"win": {
"${METAPACKAGE_ID}": {
"runtime.win.${METAPACKAGE_ID}": "${PACKAGE_VERSION}"
}
}
}
}

View File

@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(DotNetRestoreSourcePropsPath)" Condition="'$(DotNetRestoreSourcePropsPath)' != ''"/>
<PropertyGroup>
<IncludeBuildOutput>false</IncludeBuildOutput>
<IncludeSymbols>false</IncludeSymbols>
<TargetFramework>netcoreapp2.1</TargetFramework>
<PackageTags>aspnetcore</PackageTags>
<Description>runtime.win.Microsoft.AspNetCore.All</Description>
<EnableApiCheck>false</EnableApiCheck>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(DotNetRestoreSourcePropsPath)" Condition="'$(DotNetRestoreSourcePropsPath)' != ''"/>
<PropertyGroup>
<IncludeBuildOutput>false</IncludeBuildOutput>
<IncludeSymbols>false</IncludeSymbols>
<TargetFramework>netcoreapp2.1</TargetFramework>
<PackageTags>aspnetcore</PackageTags>
<Description>runtime.win.Microsoft.AspNetCore.App</Description>
<EnableApiCheck>false</EnableApiCheck>
</PropertyGroup>
</Project>