-
Notifications
You must be signed in to change notification settings - Fork 105
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
73 lines (68 loc) · 3.72 KB
/
Copy pathDirectory.Build.props
File metadata and controls
73 lines (68 loc) · 3.72 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<Project>
<!--
Shared package metadata for every Supabase.* package in the monorepo. Now that all
packages live in one repository, the repository URL, licence, authors and copyright
are uniform, so they live here instead of being duplicated (and drifting) across each
csproj. Package-specific metadata (PackageId, Title, Description, tags, version,
readme, and PackageProjectUrl which deep-links to each package's folder) stays in the
individual projects.
The package icon is identical across all packages, so it lives once at resources/icon.png
and is packed from here. Referenced via $(MSBuildThisFileDirectory) so it resolves from
any project depth, and marked Visible="false" so it does not appear as a linked file in
the IDE project tree.
-->
<PropertyGroup>
<Authors>Supabase</Authors>
<Copyright>MIT</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryUrl>https://github.com/supabase/supabase-csharp</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<!--
"latest" tracks the installed SDK's newest C# so packages are never stuck behind the
language, independent of the netstandard2.1 target. It is uniform here so it cannot
drift per package (it previously did: some projects pinned 8.0/9.0, others latest).
Using C# 9+ init-only setters or records on netstandard2.1 needs a local
System.Runtime.CompilerServices.IsExternalInit shim.
-->
<LangVersion>latest</LangVersion>
</PropertyGroup>
<!--
Target frameworks are uniform across the monorepo: shipped packages ship as
netstandard2.1, and test projects run on net10.0. Keyed off the project-name suffix
so a new package or test project inherits the right target with no per-project setting.
-->
<PropertyGroup Condition="!$(MSBuildProjectName.EndsWith('.Tests'))">
<TargetFramework>netstandard2.1</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition="$(MSBuildProjectName.EndsWith('.Tests'))">
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>
<!--
Test projects keep the documentation file on (so IDE0005 unused-using analysis still runs
on build) but suppress CS1591: public test fixtures and their members are not API surface
and are not expected to carry XML doc comments.
-->
<PropertyGroup Condition="$(MSBuildProjectName.EndsWith('.Tests'))">
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
<!-- Shared package icon, applied to packable projects only (test projects set IsPackable=false). -->
<PropertyGroup Condition="'$(IsPackable)' != 'false'">
<PackageIcon>icon.png</PackageIcon>
</PropertyGroup>
<ItemGroup Condition="'$(IsPackable)' != 'false'">
<None Include="$(MSBuildThisFileDirectory)resources\icon.png" Pack="true" PackagePath="\" Visible="false" />
</ItemGroup>
<!--
Verify (approval tests) auto-discovers SolutionDir by searching only the project directory and its
two parents for a .sln. Test projects nest three deep (packages/<Name>/<Name>.Tests), and the gate
builds each test project directly rather than via the solution, so that search misses Supabase.sln at
the repo root and Verify emits a spurious "No solution files found" warning on every test build. This
file sits at the repo root beside the solution, so point Verify at it explicitly. Guarded so a real
solution build (which sets SolutionDir itself) still wins.
-->
<PropertyGroup Condition="$(MSBuildProjectName.EndsWith('.Tests')) And ('$(SolutionDir)' == '' Or '$(SolutionDir)' == '*Undefined*')">
<SolutionDir>$(MSBuildThisFileDirectory)</SolutionDir>
<SolutionName>Supabase</SolutionName>
</PropertyGroup>
</Project>