2020-11-13 20:31:39 +03:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<Project>
|
|
|
|
|
2022-10-24 22:49:17 +03:00
|
|
|
<!-- This target is used to compute the inputs and outputs for running the `yarn install`. -->
|
2020-11-13 20:31:39 +03:00
|
|
|
<Target
|
2022-10-24 22:49:17 +03:00
|
|
|
Name="ReactNativeYarnInstallInputAndOutputs"
|
2020-11-13 20:31:39 +03:00
|
|
|
>
|
|
|
|
<ItemGroup>
|
2022-10-24 22:49:17 +03:00
|
|
|
<_ReactNativeYarnInstallInputFiles Include="$(MSBuildThisFileDirectory)yarn.lock" />
|
|
|
|
<_ReactNativeYarnInstallInputFiles Include="$(MSBuildThisFileDirectory)**\package.json" Exclude="$(MSBuildThisFileDirectory)node_modules\**" />
|
|
|
|
<_ReactNativeYarnInstallOutputFiles Include="@(_ReactNativeYarnInstallInputFiles->'$(ReactNativeYarnIntDir)%(RecursiveDir)%(Filename)%(Extension).dummy')" />
|
2020-11-13 20:31:39 +03:00
|
|
|
</ItemGroup>
|
|
|
|
</Target>
|
|
|
|
|
2021-12-04 10:19:47 +03:00
|
|
|
<!--
|
2022-10-24 22:49:17 +03:00
|
|
|
This target runs `yarn install` and then `yarn build` as a post install step in `package.json`.
|
|
|
|
This is to address build failures by not running `yarn install` after syncing.
|
|
|
|
We do not run `yarn install` during design time build and in our CI validation runs (detected via AGENT_NAME).
|
2021-01-15 02:04:03 +03:00
|
|
|
-->
|
2020-11-13 20:31:39 +03:00
|
|
|
<Target
|
2022-10-24 22:49:17 +03:00
|
|
|
Name="ReactNativeYarnInstall"
|
2020-11-13 20:31:39 +03:00
|
|
|
BeforeTargets="BeforeBuild"
|
2022-10-24 22:49:17 +03:00
|
|
|
DependsOnTargets="ReactNativeYarnInstallInputAndOutputs"
|
|
|
|
Inputs="@(_ReactNativeYarnInstallInputFiles)"
|
|
|
|
Outputs="@(_ReactNativeYarnInstallOutputFiles)"
|
2021-11-02 20:45:52 +03:00
|
|
|
Condition="'$(DesignTimeBuild)'=='' AND '$(AGENT_NAME)' == ''"
|
2020-11-13 20:31:39 +03:00
|
|
|
>
|
|
|
|
|
2022-10-24 22:49:17 +03:00
|
|
|
<Message Text="Running yarn install to fetch latest packages." Importance="High" />
|
|
|
|
<Message Text="yarn install --frozen-lockfile --mutex file:.yarn-mutex" Importance="High" />
|
2021-12-04 10:19:47 +03:00
|
|
|
<Exec
|
2020-11-13 20:31:39 +03:00
|
|
|
ContinueOnError="True"
|
2022-10-24 22:49:17 +03:00
|
|
|
Command="yarn install --frozen-lockfile --mutex file:.yarn-mutex"
|
2020-11-13 20:31:39 +03:00
|
|
|
WorkingDirectory="$(MSBuildThisFileDirectory)"
|
|
|
|
>
|
2022-10-24 22:49:17 +03:00
|
|
|
<Output TaskParameter="ExitCode" ItemName="_ReactNativeYarnExitCode"/>
|
2020-11-13 20:31:39 +03:00
|
|
|
</Exec>
|
2024-03-21 01:42:33 +03:00
|
|
|
|
2022-10-24 22:49:17 +03:00
|
|
|
<Message Text="yarn install: Succeeded" Condition="'%(_ReactNativeYarnExitCode.Identity)' == '0'" Importance="High" />
|
|
|
|
<Message Text="yarn install: Failed" Condition="'%(_ReactNativeYarnExitCode.Identity)' != '0'" Importance="High" />
|
2020-11-13 20:31:39 +03:00
|
|
|
|
2022-10-24 22:49:17 +03:00
|
|
|
<!-- Fail the build if yarn needs to update yarn.lock file. -->
|
2021-12-04 10:19:47 +03:00
|
|
|
<Error
|
2022-10-24 22:49:17 +03:00
|
|
|
Condition="'%(_ReactNativeYarnExitCode.Identity)' != '0'"
|
|
|
|
Text="Yarn packages are out of date. Please run `yarn install` in the root of the repo to ensure the generated files are up to date"
|
2020-11-13 20:31:39 +03:00
|
|
|
/>
|
|
|
|
|
2021-12-04 10:19:47 +03:00
|
|
|
<!--
|
|
|
|
Copy the yarn.lock file to prevent this task from running over and over again, and only rerun the check with yarn.lock or any package.json changes.
|
2020-11-13 20:31:39 +03:00
|
|
|
This will likely miss a few corner cases with local changes to package.json but should catch the most important case after syncing
|
|
|
|
-->
|
2022-10-24 22:49:17 +03:00
|
|
|
<MakeDir Directories="$(ReactNativeYarnIntDir)" />
|
2020-11-13 20:31:39 +03:00
|
|
|
<Copy
|
2022-10-24 22:49:17 +03:00
|
|
|
Condition="'%(_ReactNativeYarnExitCode.Identity)' == '0'"
|
|
|
|
SourceFiles="@(_ReactNativeYarnInstallInputFiles)"
|
|
|
|
DestinationFiles="@(_ReactNativeYarnInstallOutputFiles)"
|
2020-12-22 11:05:57 +03:00
|
|
|
SkipUnchangedFiles="true"
|
|
|
|
Retries="5"
|
|
|
|
RetryDelayMilliseconds="100" />
|
2020-11-13 20:31:39 +03:00
|
|
|
<!-- We have to touch the outputs to ensure up to date incrementaility works-->
|
2022-10-24 22:49:17 +03:00
|
|
|
<Touch Files="@(_ReactNativeYarnInstallOutputFiles)" />
|
2020-11-13 20:31:39 +03:00
|
|
|
|
|
|
|
</Target>
|
|
|
|
|
2021-12-04 10:19:47 +03:00
|
|
|
<!-- For build debugging purposes. -->
|
|
|
|
<Target Name="Vars">
|
2022-01-05 01:46:03 +03:00
|
|
|
|
|
|
|
<ItemGroup>
|
|
|
|
<_VarsGeneral Include="
|
|
|
|
ApplicationType;
|
|
|
|
Configuration;
|
|
|
|
Platform;
|
|
|
|
PlatformTarget;
|
|
|
|
PlatformName;
|
|
|
|
DefaultPlatformToolset;
|
|
|
|
PlatformToolset;
|
2022-01-21 11:21:00 +03:00
|
|
|
SolutionPath;
|
2022-01-05 01:46:03 +03:00
|
|
|
SolutionDir;
|
|
|
|
IntDir;
|
|
|
|
OutDir;
|
|
|
|
TargetDir;
|
|
|
|
TargetPath;
|
|
|
|
TLogLocation;
|
|
|
|
LastBuildUnsuccessful;
|
|
|
|
LastBuildState;
|
|
|
|
GeneratedFilesDir;
|
|
|
|
TargetFrameworkMoniker;
|
|
|
|
MSBuildExtensionsPath;
|
|
|
|
MSBuildExtensionsPath32;
|
|
|
|
MSBuildExtensionsPath64;
|
|
|
|
VCTargetsPath;
|
|
|
|
UserRootDir;
|
|
|
|
ProjectHome;
|
2024-03-21 01:42:33 +03:00
|
|
|
BaseIntermediateOutputPath;
|
2022-03-05 11:35:13 +03:00
|
|
|
IntermediateOutputPath;
|
|
|
|
OutputPath;
|
2024-03-21 01:42:33 +03:00
|
|
|
OS;
|
2022-01-05 01:46:03 +03:00
|
|
|
" />
|
|
|
|
<_VarsCustom Include="
|
|
|
|
RootDir;
|
|
|
|
RootIntDir;
|
|
|
|
RootOutDir;
|
|
|
|
BaseIntDir;
|
|
|
|
BaseOutDir;
|
|
|
|
ReactNativeDir;
|
|
|
|
ReactNativeWindowsDir;
|
|
|
|
FollyDir;
|
|
|
|
YogaDir;
|
|
|
|
WinVer;
|
|
|
|
" />
|
|
|
|
<_VarsWinRT Include="
|
|
|
|
UnmergedWinmdDirectory;
|
|
|
|
MergedWinmdDirectory;
|
|
|
|
" />
|
|
|
|
<_VarsJSEngine Include="
|
|
|
|
PkgReactNative_Hermes_Windows;
|
|
|
|
EnableHermesInspectorInReleaseFlavor;
|
|
|
|
UseHermes;
|
|
|
|
HermesVersion;
|
|
|
|
HermesPackage;
|
|
|
|
HermesArch;
|
|
|
|
UseFabric;
|
|
|
|
UseV8;
|
|
|
|
V8Package;
|
|
|
|
V8Version;
|
|
|
|
V8AppPlatform;
|
|
|
|
" />
|
|
|
|
<_VarsNuGet Include="
|
|
|
|
AssetTargetFallback;
|
|
|
|
IncludeFrameworkReferencesFromNuGet;
|
|
|
|
NuGetPackageRoot;
|
|
|
|
NuGetPackagesDirectory;
|
|
|
|
NuGetRuntimeIdentifier;
|
|
|
|
ProjectLockFile;
|
|
|
|
NuGetTargetMoniker;
|
|
|
|
TargetFramework;
|
|
|
|
TargetFrameworks;
|
|
|
|
TargetFrameworkIdentifier;
|
|
|
|
BaseNuGetRuntimeIdentifier;
|
|
|
|
TargetPlatformIdentifier;
|
|
|
|
MSBuildProjectExtensionsPath;
|
|
|
|
RestoreProjectStyle;
|
|
|
|
RestoreUseStaticGraphEvaluation;
|
|
|
|
" />
|
|
|
|
<_VarsWinUI Include="
|
|
|
|
UseWinUI3;
|
|
|
|
WinUI3Version;
|
|
|
|
WinUI2xVersion;
|
|
|
|
WinUIPackageName;
|
|
|
|
WinUIPackageVersion;
|
|
|
|
IsWinUIAlpha;
|
|
|
|
" />
|
|
|
|
</ItemGroup>
|
|
|
|
|
2021-12-04 10:19:47 +03:00
|
|
|
<Message Text="General" />
|
2022-01-05 01:46:03 +03:00
|
|
|
<Message Text="=> @(_VarsGeneral->PadRight(24)) [$(%(_VarsGeneral.Identity))]" />
|
|
|
|
|
|
|
|
<Message Text="%0A" />
|
|
|
|
<Message Text="Custom" />
|
|
|
|
<Message Text="=> @(_VarsCustom->PadRight(24)) [$(%(_VarsCustom.Identity))]" />
|
2021-12-04 10:19:47 +03:00
|
|
|
|
|
|
|
<Message Text="%0A" />
|
|
|
|
<Message Text="Microsoft.CppBuild.targets/MakeDirsForCl" />
|
2022-01-05 01:46:03 +03:00
|
|
|
<Message Text="=> PrecompiledHeaderOutputFile [@(CLCompile->Metadata('PrecompiledHeaderOutputFile')->DirectoryName()->Distinct())]" />
|
|
|
|
<Message Text="=> AssemblerListingLocation [@(CLCompile->Metadata('AssemblerListingLocation')->DirectoryName()->Distinct())]" />
|
|
|
|
<Message Text="=> ObjectFileName [@(CLCompile->Metadata('ObjectFileName')->DirectoryName()->Distinct())]" />
|
|
|
|
<Message Text="=> ProgramDataBaseFileName [@(CLCompile->Metadata('ProgramDataBaseFileName')->DirectoryName()->Distinct())]" />
|
|
|
|
<Message Text="=> XMLDocumentationFileName [@(CLCompile->Metadata('XMLDocumentationFileName')->DirectoryName()->Distinct())]" />
|
|
|
|
<Message Text="=> BrowseInformationFile [@(CLCompile->Metadata('BrowseInformationFile')->DirectoryName()->Distinct())]" />
|
|
|
|
<Message Text="=> PreprocessOutputPath [@(CLCompile->Metadata('PreprocessOutputPath')->DirectoryName()->Distinct())]" />
|
|
|
|
<Message Text="=> PreprocessorDefinitions [@(CLCompile->Metadata('PreprocessorDefinitions')->Distinct())]" />
|
|
|
|
<Message Text="=> ClDirsToMake [@(ClDirsToMake)]" />
|
2021-12-04 10:19:47 +03:00
|
|
|
|
|
|
|
<Message Text="%0A" />
|
2022-01-05 01:46:03 +03:00
|
|
|
<Message Text="WinRT" />
|
|
|
|
<Message Text="=> @(_VarsWinRT->PadRight(24)) [$(%(_VarsWinRT.Identity))]" />
|
2021-12-04 10:19:47 +03:00
|
|
|
|
|
|
|
<Message Text="%0A" />
|
|
|
|
<Message Text="JS Engine" />
|
2022-01-05 01:46:03 +03:00
|
|
|
<Message Text="=> @(_VarsJSEngine->PadRight(40)) [$(%(_VarsJSEngine.Identity))]" />
|
2021-12-04 10:19:47 +03:00
|
|
|
|
|
|
|
<Message Text="%0A" />
|
|
|
|
<Message Text="NuGet" />
|
2022-01-05 01:46:03 +03:00
|
|
|
<Message Text="=> @(_VarsNuGet->PadRight(40)) [$(%(_VarsNuGet.Identity))]" />
|
2022-03-05 11:35:13 +03:00
|
|
|
<Message Text="=> PackageReference->Count [@(PackageReference->Count())]" />
|
2021-12-04 10:19:47 +03:00
|
|
|
|
|
|
|
<Message Text="%0A" />
|
|
|
|
<Message Text="WinUI" />
|
2022-01-05 01:46:03 +03:00
|
|
|
<Message Text="=> @(_VarsWinUI->PadRight(40)) [$(%(_VarsWinUI.Identity))]" />
|
2021-12-04 10:19:47 +03:00
|
|
|
|
2022-03-09 05:10:14 +03:00
|
|
|
<Message Text="%0A" />
|
|
|
|
<Message Text="Items" />
|
|
|
|
<Message Text="=> ProjectCapability" />
|
|
|
|
<Message Text=" %(ProjectCapability.Identity)" />
|
|
|
|
|
2021-12-04 10:19:47 +03:00
|
|
|
</Target>
|
2020-11-13 20:31:39 +03:00
|
|
|
|
2021-12-28 03:27:30 +03:00
|
|
|
</Project>
|