-
Notifications
You must be signed in to change notification settings - Fork 3
/
software.msbuild.groupproj.targets
42 lines (34 loc) · 1.44 KB
/
software.msbuild.groupproj.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
<Import Project="$(GroupProj)" />
<Target Name="GetGroupProjPath">
<ItemGroup>
<GroupProj Include="$(GroupProj)" />
</ItemGroup>
<PropertyGroup>
<GroupProjPath>@(GroupProj->'%(RootDir)%(Directory)')</GroupProjPath>
</PropertyGroup>
</Target>
<Target Name="Get_Projects" DependsOnTargets="GetGroupProjPath" Outputs="@(Projects)">
<ItemGroup>
<Temp Include="@(Projects->'$(GroupProjPath)%(Identity)')" />
<Projects Remove="@(Projects)" />
<Projects Include="@(Temp)" />
<Temp Remove="@(Temp)" />
</ItemGroup>
</Target>
<Target Name="Get_Project_Metadata" Inputs="@(Projects)" Outputs="%(Identity).Dummy">
<MSBuild Projects="software.msbuild.dcp.targets" Targets="Get_Projects_DCP" Properties="ProjectFile=%(Projects.Identity)">
<Output TaskParameter="TargetOutputs" ItemName="Projects_DCPs" />
</MSBuild>
<MSBuild Projects="software.msbuild.dcp.targets" Targets="Get_Projects_AppType" Properties="ProjectFile=%(Projects.Identity)">
<Output TaskParameter="TargetOutputs" PropertyName="AppType" />
</MSBuild>
<ItemGroup>
<Projects>
<DCPs>@(Projects_DCPs)</DCPs>
<AppType>$(AppType)</AppType>
</Projects>
</ItemGroup>
</Target>
<Target Name="GroupProj_to_Projects" Condition="Exists($(GroupProj))" DependsOnTargets="Get_Projects;Get_Project_Metadata" Outputs="@(Projects)"/>
</Project>