Welcome to mirror list, hosted at ThFree Co, Russian Federation.

build.proj - github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b39ae63c8098abc4453cf2782ceb20b0705f7ce4 (plain)
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
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="BuildAndTest" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="dir.props" />

  <!-- The following properties are in place to keep the behavior of build.cmd while we work on the dev workflow steps. -->
  <PropertyGroup>
    <!-- To disable the restoration of packages, set RestoreDuringBuild=false or pass /p:RestoreDuringBuild=false.-->
    <RestoreDuringBuild Condition="'$(RestoreDuringBuild)'==''">true</RestoreDuringBuild>
  </PropertyGroup>

  <PropertyGroup>
    <GenerateCodeCoverageReportForAll>true</GenerateCodeCoverageReportForAll>
  </PropertyGroup>
  <Import Project="$(ToolsDir)CodeCoverage.targets" Condition="Exists('$(ToolsDir)CodeCoverage.targets')" />
  <Import Project="$(ToolsDir)PerfTesting.targets" Condition="Exists('$(ToolsDir)PerfTesting.targets') and '$(Performance)' == 'true'"/>

  <ItemGroup>
    <Project Include="src\dirs.proj" />
  </ItemGroup>

  <Import Project="dir.targets" />

  <Import Project="dir.traversal.targets" />

  <PropertyGroup Condition="'$(RestoreDuringBuild)'=='true'">
    <TraversalBuildDependsOn>
      BatchRestorePackages;
      $(TraversalBuildDependsOn);
    </TraversalBuildDependsOn>
  </PropertyGroup>

  <Target Name="BatchRestorePackages">
    <MakeDir Directories="$(PackagesDir)" Condition="!Exists('$(PackagesDir)')" />

    <Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Restoring all packages..." />

    <Exec Command="$(DnuRestoreCommand) @(DnuRestoreDir->'&quot;%(Identity)&quot;', ' ')"
          StandardOutputImportance="Low"
          CustomErrorRegularExpression="(^Unable to locate .*)|(^Updating the invalid lock file with .*)"
          ContinueOnError="ErrorAndContinue" />

    <Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Restoring all packages...Done." />
  </Target>

  <!-- Override RestorePackages from dir.traversal.targets and do a batch restore -->
  <Target Name="RestorePackages" DependsOnTargets="BatchRestorePackages" />

  <!-- Override clean from dir.traversal.targets and just remove the full BinDir unless build.[cmd|sh] has already done the cleaning -->
  <Target Name="Clean">
    <RemoveDir Condition="'$(CleanedTheBuild)' != '1'" Directories="$(ObjDir)" />
  </Target>

</Project>