forked from Azure/azure-sdk-for-net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathservice.proj
156 lines (143 loc) · 10.2 KB
/
service.proj
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<Project Sdk="Microsoft.Build.Traversal">
<PropertyGroup>
<SDKType Condition="'$(SDKType)' == ''">all</SDKType>
<ServiceDirectory Condition="'$(ServiceDirectory)' == '' and '$(Scope)' != ''">$(Scope)</ServiceDirectory>
<ServiceDirectory Condition="'$(ServiceDirectory)' == ''">*</ServiceDirectory>
<Project Condition="'$(Project)' == ''">**</Project>
<IncludeTests Condition="'$(IncludeTests)' == ''">true</IncludeTests>
<IncludeSrc Condition="'$(IncludeSrc)' == ''">true</IncludeSrc>
<IncludeSamples Condition="'$(IncludeSamples)' == ''">true</IncludeSamples>
<IncludePerf Condition="'$(IncludePerf)' == ''">true</IncludePerf>
<IncludeStress Condition="'$(IncludeStress)' == ''">true</IncludeStress>
<IncludeSamplesApplications Condition="'$(IncludeSamplesApplications)' == ''">true</IncludeSamplesApplications>
<IncludeSamplesApplications Condition="'$(ServiceDirectory)' != '*' or '$(IncludeSamples)' == 'false'">false</IncludeSamplesApplications>
</PropertyGroup>
<ItemGroup Condition="'$(ProjectListOverrideFile)' == '' ">
<MgmtExcludePaths Include="$(MSBuildThisFileDirectory)..\sdk\*\Microsoft.*.Management.*\**\*.csproj;$(MSBuildThisFileDirectory)..\sdk\*mgmt*\**\*.csproj" />
<MgmtExcludePaths Include="$(MSBuildThisFileDirectory)..\sdk\batch\Microsoft.Azure.Batch\**\*.csproj" />
<MgmtExcludePaths Include="$(MSBuildThisFileDirectory)..\sdk\batch\Microsoft.Azure.Batch.*\**\*.csproj" />
<!-- because this project is using the project below -->
<MgmtExcludePaths Include="$(MSBuildThisFileDirectory)..\sdk\cognitivelanguage\Azure.AI.Language.QuestionAnswering\tests\Azure.AI.Language.QuestionAnswering.Tests.csproj" />
<MgmtExcludePaths Include="$(MSBuildThisFileDirectory)..\sdk\cognitiveservices\Knowledge.QnAMaker\**\*.csproj" />
<MgmtExcludePaths Include="$(MSBuildThisFileDirectory)..\sdk\cognitiveservices\Vision.CustomVision.Prediction\**\*.csproj" />
<MgmtExcludePaths Include="$(MSBuildThisFileDirectory)..\sdk\cognitiveservices\Search.BingWebSearch\**\*.csproj" />
<MgmtExcludePaths Include="$(MSBuildThisFileDirectory)..\sdk\cognitiveservices\Vision.ComputerVision\**\*.csproj" />
<MgmtExcludePaths Include="$(MSBuildThisFileDirectory)..\sdk\cognitiveservices\Vision.ContentModerator\**\*.csproj" />
<MgmtExcludePaths Include="$(MSBuildThisFileDirectory)..\sdk\cognitiveservices\Search.BingNewsSearch\**\*.csproj" />
<MgmtExcludePaths Include="$(MSBuildThisFileDirectory)..\sdk\cognitiveservices\Search.BingLocalSearch\**\*.csproj" />
<MgmtExcludePaths Include="$(MSBuildThisFileDirectory)..\sdk\cognitiveservices\Search.BingImageSearch\**\*.csproj" />
<MgmtExcludePaths Include="$(MSBuildThisFileDirectory)..\sdk\cognitiveservices\Search.BingVisualSearch\**\*.csproj" />
<MgmtExcludePaths Include="$(MSBuildThisFileDirectory)..\sdk\cognitiveservices\Search.BingVideoSearch\**\*.csproj" />
<MgmtExcludePaths Include="$(MSBuildThisFileDirectory)..\sdk\cognitiveservices\Search.BingAutoSuggest\**\*.csproj" />
<MgmtExcludePaths Include="$(MSBuildThisFileDirectory)..\sdk\cognitiveservices\Search.BingEntitySearch\**\*.csproj" />
<MgmtExcludePaths Include="$(MSBuildThisFileDirectory)..\sdk\cognitiveservices\Search.BingCustomSearch\**\*.csproj" />
<MgmtExcludePaths Include="$(MSBuildThisFileDirectory)..\sdk\cognitiveservices\Search.BingCustomImageSearch\**\*.csproj" />
<MgmtExcludePaths Include="$(MSBuildThisFileDirectory)..\sdk\cognitiveservices\AnomalyDetector\**\*.csproj" />
<MgmtExcludePaths Include="$(MSBuildThisFileDirectory)..\sdk\cognitiveservices\Language.LUIS.Authoring\**\*.csproj" />
<MgmtExcludePaths Include="$(MSBuildThisFileDirectory)..\sdk\cognitiveservices\Language.LUIS.Runtime\**\*.csproj" />
<MgmtExcludePaths Include="$(MSBuildThisFileDirectory)..\sdk\cognitiveservices\Language.TextAnalytics\**\*.csproj" />
<MgmtExcludePaths Include="$(MSBuildThisFileDirectory)..\sdk\cognitiveservices\Language.SpellCheck\**\*.csproj" />
<MgmtExcludePaths Include="$(MSBuildThisFileDirectory)..\sdk\cognitiveservices\FormRecognizer\**\*.csproj" />
<MgmtExcludePaths Include="$(MSBuildThisFileDirectory)..\sdk\cognitiveservices\Vision.Face\**\*.csproj" />
<MgmtExcludePaths Include="$(MSBuildThisFileDirectory)..\sdk\cognitiveservices\Vision.CustomVision.Training\**\*.csproj" />
<MgmtExcludePaths Include="$(MSBuildThisFileDirectory)..\sdk\cognitiveservices\Personalizer\**\*.csproj" />
<MgmtExcludePaths Include="$(MSBuildThisFileDirectory)..\sdk\hdinsight\Microsoft.Azure.HDInsight.Job\**\*.csproj" />
<TestProjects Include="..\sdk\$(ServiceDirectory)\$(Project)\tests\**\*.csproj" />
<SamplesProjects Include="..\sdk\$(ServiceDirectory)\$(Project)\samples\**\*.csproj;..\sdk\$(ServiceDirectory)\samples\**\*.csproj" />
<PerfProjects Include="..\sdk\$(ServiceDirectory)\$(Project)\perf\**\*.csproj" />
<StressProjects Include="..\sdk\$(ServiceDirectory)\$(Project)\stress\**\*.csproj" />
<SampleApplications Include="..\samples\**\*.csproj" />
<SrcProjects Include="..\sdk\$(ServiceDirectory)\$(Project)\src\**\*.csproj" Exclude="@(TestProjects);@(SamplesProjects);@(PerfProjects);@(StressProjects)" />
<ProjectReference Include="@(TestProjects)" Exclude="@(MgmtExcludePaths)" Condition="'$(IncludeTests)' == 'true'" />
<ProjectReference Include="@(SamplesProjects)" Exclude="@(MgmtExcludePaths)" Condition="'$(IncludeSamples)' == 'true'" />
<ProjectReference Include="@(PerfProjects)" Exclude="@(MgmtExcludePaths)" Condition="'$(IncludePerf)' == 'true'" />
<ProjectReference Include="@(StressProjects)" Exclude="@(MgmtExcludePaths)" Condition="'$(IncludeStress)' == 'true'" />
<ProjectReference Include="@(SampleApplications)" Exclude="@(MgmtExcludePaths)" Condition="'$(IncludeSamplesApplications)' == 'true'"/>
<ProjectReference Include="@(SrcProjects)" Exclude="@(MgmtExcludePaths)" Condition="'$(IncludeSrc)' == 'true'" />
</ItemGroup>
<Import Project="..\sdk\$(ServiceDirectory)\*.projects" />
<Import Project="$(RepoRoot)$(ProjectListOverrideFile)" Condition="'$(ProjectListOverrideFile)' != '' " />
<!-- Remove all track1 SDKs from Regen -->
<ItemGroup Condition="'$(ProjectListOverrideFile)' != '' ">
<Track1ProjectsToRemove Include="$(MSBuildThisFileDirectory)..\sdk\*\Microsoft.*.Management.*\**\*.csproj;$(MSBuildThisFileDirectory)..\sdk\*mgmt*\**\*.csproj;$(MSBuildThisFileDirectory)..\sdk\*\Microsoft.Azure.*\**\*.csproj" />
<ProjectReference Remove="@(Track1ProjectsToRemove)" />
</ItemGroup>
<!-- Remove all projects except the ones included by the SDKType filter -->
<ItemGroup Condition="'$(SDKType)' != 'all'">
<ProjectsToRemove Include="@(ProjectReference)" Exclude="@(ProjectsToIncludeBySDKType)" />
<ProjectReference Remove="@(ProjectsToRemove)" />
</ItemGroup>
<Target Name="CheckProjects" AfterTargets="Build">
<!-- If scope is set this likely came from a call to build.proj and in cases where there is only mgmt projects we don't want to error so skip this extra check -->
<Error Condition="'$(Scope)' == '' and '@(ProjectReference)' == ''"
Text="No Projects found with patttern [..\sdk\$(ServiceDirectory)\$(Project)\*.csproj], please make sure you have passed in the correct ServiceDirectory." />
</Target>
<Target Name="GenerateCode">
<MSBuild Projects="@(ProjectReference)"
Targets="GenerateCode"
BuildInParallel="$(BuildInParallel)"
SkipNonexistentProjects="false"
SkipNonexistentTargets="true" />
</Target>
<Target Name="GenerateTests">
<MSBuild Projects="@(ProjectReference)"
Targets="GenerateTests"
BuildInParallel="$(BuildInParallel)"
SkipNonexistentProjects="false"
SkipNonexistentTargets="true" />
</Target>
<Target Name="ExportApi">
<MSBuild Projects="@(ProjectReference)"
Targets="ExportApi"
BuildInParallel="$(BuildInParallel)"
SkipNonexistentProjects="false"
SkipNonexistentTargets="true" />
</Target>
<Target Name="FinalBuildReferencesOutput" BeforeTargets="Build" Condition="'$(SDKType)' != 'all'">
<Message Text="Final Build References:" Importance="high"/>
<Message Text=" %(ProjectReference.Identity)" Importance="high"/>
</Target>
<Target Name="GetPackageInfo">
<MSBuild Projects="@(ProjectReference)"
Targets="GetPackageInfo"
BuildInParallel="$(BuildInParallel)"
SkipNonexistentProjects="false"
SkipNonexistentTargets="true" />
</Target>
<Target Name="GetCodeGenProjects">
<MSBuild Projects="@(ProjectReference)"
Targets="GetCodeGenProjects"
BuildInParallel="$(BuildInParallel)"
SkipNonexistentProjects="false"
SkipNonexistentTargets="true">
<Output ItemName="ProjectsToInclude" TaskParameter="TargetOutputs"/>
</MSBuild>
<RemoveDuplicates Inputs="@(ProjectsToInclude->Replace($(RepoRoot), ''))">
<Output TaskParameter="Filtered" ItemName="ProjectsToIncludeFitered"/>
</RemoveDuplicates>
<Message Text="Write to file $(OutputProjectFilePath)" Importance="high"/>
<Message Text="%24%28RepoRoot%29%(ProjectsToIncludeFitered.Identity)" Importance="high"/>
<ItemGroup>
<_WriteToLines Include="%24%28RepoRoot%29%(ProjectsToIncludeFitered.Identity)" />
</ItemGroup>
<WriteLinesToFile File="$(OutputProjectFilePath)" Lines="@(_WriteToLines)" />
</Target>
<Target Name="ProjectDependsOn">
<MSBuild Projects="@(ProjectReference)"
Targets="ProjectDependsOn"
BuildInParallel="$(BuildInParallel)"
SkipNonexistentProjects="false"
SkipNonexistentTargets="true">
<Output ItemName="ProjectsToInclude" TaskParameter="TargetOutputs"/>
</MSBuild>
<RemoveDuplicates Inputs="@(ProjectsToInclude->Replace($(RepoRoot), ''))">
<Output TaskParameter="Filtered" ItemName="ProjectsToIncludeFitered"/>
</RemoveDuplicates>
<Message Text="Write to file $(OutputProjectFilePath)" Importance="high"/>
<Message Text="%24%28RepoRoot%29%(ProjectsToIncludeFitered.Identity)" Importance="high"/>
<ItemGroup>
<_WriteToLines Include="%24%28RepoRoot%29%(ProjectsToIncludeFitered.Identity)" />
</ItemGroup>
<WriteLinesToFile File="$(OutputProjectFilePath)" Lines="@(_WriteToLines)" />
</Target>
</Project>