-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathApiCodeGenerator.MSBuild.targets
More file actions
32 lines (28 loc) · 1.44 KB
/
ApiCodeGenerator.MSBuild.targets
File metadata and controls
32 lines (28 loc) · 1.44 KB
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
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ItemGroup>
<OpenApiReference Update="@(OpenApiReference)">
<Variables>%(Variables),$(AcgDefaultVariables)</Variables>
</OpenApiReference>
</ItemGroup>
<!-- Удаление сгенрированных файлов в при запуске задачи Clenup -->
<Target Name="CleanAcgGeneratedCode"
AfterTargets="CoreClean"
Condition="'$(AcgCleanupEnabled)' == 'true'"
DependsOnTargets="_GetMetadataForOpenApiReferences">
<Delete Files="@(OpenApiReference->'%(OutputPath)')" />
</Target>
<!-- При изменении файла настроек удаляем сгенерированый код для запуска генерации -->
<Target Name="_GenerateOpenApiCodeConfigChanged"
BeforeTargets="_GenerateOpenApiCode"
Condition="$(OpenApiGenerateCodeAtDesignTime) OR ('$(DesignTimeBuild)' != 'true' AND '$(BuildingProject)' == 'true')"
Inputs="%(OpenApiReference.Options)"
Outputs="%(OpenApiReference.OutputPath)">
<Delete Files="%(OpenApiReference.OutputPath)" />
</Target>
<!-- Генератор для TypeScript. Нужно имя содержащее TypeScript -->
<Target Name="GenerateAcgTypeScript" DependsOnTargets="GenerateAcg">
</Target>
<Import Project="Console.targets" Condition="'$(AcgUseOwnProcess)' == 'true'" />
<Import Project="Task.targets" Condition="'$(AcgUseOwnProcess)' != 'true'" />
</Project>