@@ -3,95 +3,7 @@ SPDX-FileCopyrightText: 2021 smdn <smdn@smdn.jp>
33SPDX-License-Identifier: MIT
44-->
55<Project >
6- <PropertyGroup Label =" metadata" >
7- <!-- NuGet -->
8- <PackageProjectUrl Condition =" '$(PackageProjectUrl)' == '' " >https://smdn.jp/</PackageProjectUrl >
9- <PackageTags Condition =" !$(PackageTags.Contains('smdn.jp'))" >smdn.jp;$(PackageTags)</PackageTags >
10-
11- <!-- AssemblyInfo -->
12- <AssemblyTitle Condition =" '$(AssemblyTitle)' == '' " >$(Title)</AssemblyTitle >
13- <AssemblyTitle Condition =" '$(AssemblyTitle)' == '' " >$(AssemblyName)</AssemblyTitle >
14- <AssemblyVersion Condition =" '$(AssemblyVersion)' == '' " >$(VersionPrefix)</AssemblyVersion >
15- <AssemblyVersion Condition =" '$(AssemblyVersion)' == '' " >$(Version)</AssemblyVersion >
16- <InformationalVersion Condition =" '$(InformationalVersion)' == '' " >$(VersionPrefix)$(VersionSuffix) ($(TargetFramework))</InformationalVersion >
17- <Title Condition =" '$(Title)' == '' " >$(AssemblyName)</Title >
18- <Description Condition =" '$(Description)' == '' " >$(AssemblyName).dll</Description >
19- <Product >$(AssemblyName)-$(InformationalVersion)</Product >
20- <Company >smdn.jp (https://smdn.jp)</Company >
21- <Copyright Condition =" '$(Copyright)' == '' " >Copyright © $(CopyrightYear) $(Authors)</Copyright >
22- </PropertyGroup >
23-
24- <!-- Replaces %(ProjectReferencesWithVersions.ProjectVersion) with custom defined metadata %(ProjectReference.VersionRange) -->
25- <!-- ref: https://github.com/NuGet/Home/issues/5556 -->
26- <Target Name =" UpdateProjectReferencesWithVersionRanges" AfterTargets =" _GetProjectReferenceVersions" >
27- <ItemGroup >
28- <ProjectReferencesWithVersionsToUpdate Include =" $([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\%(ProjectReference.Identity)'))" ProjectVersion =" %(ProjectReference.VersionRange)" Condition =" '%(ProjectReference.VersionRange)' != '' " />
29-
30- <_ProjectReferencesWithVersions Remove =" %(ProjectReferencesWithVersionsToUpdate.Identity)" />
31- <_ProjectReferencesWithVersions Include =" %(ProjectReferencesWithVersionsToUpdate.Identity)" ProjectVersion =" %(ProjectReferencesWithVersionsToUpdate.ProjectVersion)" />
32- </ItemGroup >
33-
34- <!--
35- <Message Text="$([System.IO.Path]::GetFileName('%(_ProjectReferencesWithVersions.Identity)')): %(_ProjectReferencesWithVersions.ProjectVersion)" Importance="high" />
36- -->
37- </Target >
38-
39- <Target Name =" GetGitRepositoryProperties" Condition =" '$(RepositoryType)' == 'git' " >
40- <Exec Command =" git branch --show-current" ConsoleToMSBuild =" true" EchoOff =" true" StandardOutputImportance =" Low" >
41- <Output TaskParameter =" ConsoleOutput" PropertyName =" RepositoryBranch" />
42- </Exec >
43- <Exec Command =" git rev-parse HEAD" ConsoleToMSBuild =" true" EchoOff =" true" StandardOutputImportance =" Low" >
44- <Output TaskParameter =" ConsoleOutput" PropertyName =" RepositoryCommit" />
45- </Exec >
46- </Target >
47-
48- <!-- ref: NuGet.Build.Tasks.Pack.targets -->
49- <Target Name =" GetNuspecRepositoryProperties" BeforeTargets =" GenerateNuspec" DependsOnTargets =" GetGitRepositoryProperties" />
50-
51- <Target Name =" GetAssemblyAttributesAboutRepository" BeforeTargets =" GetAssemblyAttributes" DependsOnTargets =" GetGitRepositoryProperties" Condition =" '$(Configuration)' == 'Release' " >
52- <ItemGroup Label =" assembly attributes" >
53- <AssemblyMetadata Include =" RepositoryBranch" Value =" $(RepositoryBranch)" Condition =" '$(RepositoryBranch)' != '' " />
54- <AssemblyMetadata Include =" RepositoryCommit" Value =" $(RepositoryCommit)" Condition =" '$(RepositoryCommit)' != '' " />
55- </ItemGroup >
56- </Target >
57-
58- <Target Name =" GetAssemblyAttributeCLSCompliant" BeforeTargets =" GetAssemblyAttributes" >
59- <ItemGroup Label =" assembly attributes" >
60- <!-- https://github.com/dotnet/msbuild/pull/6285 -->
61- <AssemblyAttribute Include =" System.CLSCompliantAttribute" Condition =" '$(AssemblyCLSCompliant)' != '' " >
62- <_Parameter1 >$(AssemblyCLSCompliant)</_Parameter1 >
63- <_Parameter1_TypeName >System.Boolean</_Parameter1_TypeName >
64- </AssemblyAttribute >
65- </ItemGroup >
66- </Target >
67-
68- <Target Name =" WarnNupkgConfiguration" AfterTargets =" Pack" Condition =" '$(Configuration)' != 'Release' " >
69- <Warning Text =" generated nupkg with configuration '$(Configuration)'" />
70- </Target >
71-
72- <Import
73- Condition =" '$(Configuration)' == 'Release' and '$(AssemblyName)' != 'Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks' "
74- Project =" $(NuGetPackageRoot)\smdn.reflection.reversegenerating.listapi.msbuild.tasks\1.0.2\tasks\net6.0\GenerateApiList.task"
75- />
76- <!-- load task from the debug assembly instead of the package's one -->
77- <UsingTask
78- Condition =" '$(Configuration)' == 'Release' and '$(AssemblyName)' == 'Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks' "
79- TaskName =" Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks.GenerateApiList"
80- AssemblyFile =" Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks\bin\Debug\net6.0\Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks.dll"
81- />
82-
83- <Target Name =" GenerateAPIListOfPackage" AfterTargets =" Pack" Condition =" '$(Configuration)' == 'Release' " Label =" API list generator" >
84- <ItemGroup >
85- <GenerateApiListTargets Include =" %(NuGetPackInput.Identity)" Condition ="
86- '%(NuGetPackInput.MSBuildSourceProjectFile)' == '$(MSBuildProjectFullPath)' and
87- '' != '%(NuGetPackInput.TargetFramework)' and
88- $([System.String]::new('%(NuGetPackInput.TargetPath)').EndsWith('.dll'))
89- " >
90- <OutputFilePath >$(APIListOutputBaseDirectory)\$(AssemblyName)\$(AssemblyName)-%(NuGetPackInput.TargetFramework).apilist.cs</OutputFilePath >
91- <LoadIntoReflectionOnlyContext >$(APIListLoadIntoReflectionOnlyContext)</LoadIntoReflectionOnlyContext >
92- </GenerateApiListTargets >
93- </ItemGroup >
94-
95- <GenerateApiList Assemblies =" @(GenerateApiListTargets)" />
96- </Target >
6+ <ImportGroup Label =" project assets" >
7+ <Import Project =" $(SmdnProjectAssets_TargetsImports)" />
8+ </ImportGroup >
979</Project >
0 commit comments