<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <ReactAppManifest Condition="'$(ReactAppManifest)'==''">$([MSBuild]::GetDirectoryNameOfFileAbove($(SolutionDir), 'app.json'))</ReactAppManifest>
    <ReactAppManifestHeader Condition="'$(ReactAppManifestHeader)'==''">$(MSBuildProjectDirectory)\..\..\app.json.h</ReactAppManifestHeader>
    <ValidateManifestCommand>node -e "require('react-native-test-app/scripts/validate-manifest').validate('file')"</ValidateManifestCommand>
  </PropertyGroup>
  <Target Name="ValidateManifest" Inputs="$(ReactAppManifest)" Outputs="$(ReactAppManifestHeader)" BeforeTargets="PrepareForBuild">
    <Exec Command="$(ValidateManifestCommand)" WorkingDirectory="$(SolutionDir)" />
  </Target>
</Project>
