<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <NeutralLanguage>en-US</NeutralLanguage>
    <TargetFrameworks>net462;netstandard2.0;netstandard2.1;net6.0;net8.0</TargetFrameworks>

    <AssemblyOriginatorKeyFile>Jint.snk</AssemblyOriginatorKeyFile>
    <SignAssembly>true</SignAssembly>
    <IsPackable>true</IsPackable>

    <LangVersion>latest</LangVersion>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>

    <AnalysisLevel>latest-Recommended</AnalysisLevel>

    <GenerateDocumentationFile>true</GenerateDocumentationFile>
    <PackageReadmeFile>README.md</PackageReadmeFile>

    <NoWarn>$(NoWarn);1591</NoWarn>

    <IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">true</IsAotCompatible>

    <PolySharpExcludeGeneratedTypes>System.Runtime.CompilerServices.IsExternalInit;System.Runtime.CompilerServices.RequiresLocationAttribute</PolySharpExcludeGeneratedTypes>
    <PolySharpIncludeRuntimeSupportedAttributes>true</PolySharpIncludeRuntimeSupportedAttributes>

  </PropertyGroup>

  <PropertyGroup Condition=" '$(TargetFramework)' != 'net462' and '$(TargetFramework)' != 'netstandard2.0' ">
    <DefineConstants>$(DefineConstants);SUPPORTS_SPAN_PARSE;SUPPORTS_WEAK_TABLE_ADD_OR_UPDATE;SUPPORTS_WEAK_TABLE_CLEAR</DefineConstants>
  </PropertyGroup>

  <ItemGroup>
    <None Include="../README.md" Pack="true" PackagePath="\"/>
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Esprima" />
    <PackageReference Include="Meziantou.Analyzer" PrivateAssets="all" />
  </ItemGroup>

  <ItemGroup>
    <Using Remove="System.Linq" />
    <Using Remove="System.Net.Http" />
    <Using Remove="System.Threading" />
  </ItemGroup>

</Project>
