-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathGitHub.Copilot.SDK.csproj
More file actions
96 lines (84 loc) · 4.74 KB
/
Copy pathGitHub.Copilot.SDK.csproj
File metadata and controls
96 lines (84 loc) · 4.74 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0;net10.0;netstandard2.0</TargetFrameworks>
<RootNamespace>GitHub.Copilot</RootNamespace>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Version>0.0.0-dev</Version>
<Description>SDK for programmatic control of GitHub Copilot CLI</Description>
<Authors>GitHub</Authors>
<Company>GitHub</Company>
<Copyright>Copyright (c) Microsoft Corporation. All rights reserved.</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/github/copilot-sdk</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryUrl>https://github.com/github/copilot-sdk</RepositoryUrl>
<PackageIcon>copilot.png</PackageIcon>
<PackageTags>github;copilot;sdk;jsonrpc;agent</PackageTags>
<IsAotCompatible Condition="'$(TargetFramework)' != 'netstandard2.0'">true</IsAotCompatible>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<_CopilotCliVersionTarget>_GetCopilotCliVersion</_CopilotCliVersionTarget>
</PropertyGroup>
<PropertyGroup>
<NoWarn>$(NoWarn);GHCP001</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(CI)' == 'true' or '$(TF_BUILD)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<ItemGroup>
<None Include="../README.md" Pack="true" PackagePath="/" />
<None Include="../../assets/copilot.png" Pack="true" PackagePath="/" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.AI.Abstractions" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="all" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' != '' and !$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net10.0'))">
<PackageReference Include="System.Text.Json" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" />
<PackageReference Include="System.Collections.Immutable" />
<PackageReference Include="System.ComponentModel.Annotations" />
<PackageReference Include="System.Memory" />
<PackageReference Include="System.Threading.Channels" />
<PackageReference Include="System.Threading.Tasks.Extensions" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' != 'netstandard2.0'">
<Compile Remove="Polyfills\**\*.cs" />
<Compile Include="Polyfills\IsExternalInit.cs" />
</ItemGroup>
<!-- Generate version props file at build time (gitignored) -->
<Target Name="_GetCopilotCliVersion" Condition="'$(CopilotCliVersion)' == ''">
<Exec Command="node -e "console.log(require('./nodejs/package-lock.json').packages['node_modules/@github/copilot'].version)"" WorkingDirectory="$(MSBuildThisFileDirectory)../.." ConsoleToMSBuild="true" StandardOutputImportance="low">
<Output TaskParameter="ConsoleOutput" PropertyName="CopilotCliVersion" />
</Exec>
<Error Condition="'$(CopilotCliVersion)' == ''" Text="CopilotCliVersion could not be read from nodejs/package-lock.json" />
</Target>
<Target Name="_GenerateVersionProps" DependsOnTargets="_GetCopilotCliVersion" BeforeTargets="_GetPackageFiles">
<PropertyGroup>
<_VersionPropsContent>
<![CDATA[<Project>
<PropertyGroup>
<CopilotCliVersion>$(CopilotCliVersion)</CopilotCliVersion>
</PropertyGroup>
</Project>]]>
</_VersionPropsContent>
</PropertyGroup>
<WriteLinesToFile File="$(MSBuildThisFileDirectory)build\GitHub.Copilot.SDK.props" Lines="$(_VersionPropsContent)" Overwrite="true" WriteOnlyWhenDifferent="true" />
<!-- Explicitly add props file to package content after generation -->
<ItemGroup>
<None Include="build\GitHub.Copilot.SDK.props" Pack="true" PackagePath="build\" />
</ItemGroup>
</Target>
<!-- Include .targets file in package (props is added dynamically by _GenerateVersionProps) -->
<!-- Also import the .targets for local dev (same logic consumers get) -->
<ItemGroup>
<None Include="build\GitHub.Copilot.SDK.targets" Pack="true" PackagePath="build\" CopyToOutputDirectory="Never" />
</ItemGroup>
<Import Project="build\GitHub.Copilot.SDK.targets" />
</Project>